uBlockProtector icon indicating copy to clipboard operation
uBlockProtector copied to clipboard

ouo.io

Open jspenguin2017 opened this issue 9 years ago • 11 comments

Need to remove timer.

ouo.io/baozy8 ouo.io/qR1Fn ouo.press/qR1Fn ouo.press/PN6B4

Thanks to @lain566

jspenguin2017 avatar Apr 30 '17 04:04 jspenguin2017

countdown script

function Countdown(e){function o(){i(r);if(r===0){s();n.stop()}r--}var t,n=this,r=e.seconds||10,i=e.onUpdateStatus||function(){},s=e.onCounterEnd||function(){};this.start=function(){clearInterval(t);t=0;r=e.seconds;t=setInterval(o,1e3)};this.stop=function(){clearInterval(t)}}var myCounter=new Countdown({seconds:3,onUpdateStatus:function(e){document.getElementById("timer").innerHTML=e},onCounterEnd:function(){document.getElementById("countdown").className="countdown end";document.getElementById("btn-main").className="btn btn-main"}});myCounter.start()

uBlock-user avatar Apr 30 '17 04:04 uBlock-user

Unminified code:

function Countdown(e) {
    function o() {
        i(r);
        if (r === 0) {
            s();
            n.stop()
        }
        r--
    }
    var t, n = this,
        r = e.seconds || 10,
        i = e.onUpdateStatus || function() {},
        s = e.onCounterEnd || function() {};
    this.start = function() {
        clearInterval(t);
        t = 0;
        r = e.seconds;
        t = setInterval(o, 1e3)
    };
    this.stop = function() {
        clearInterval(t)
    }
}
var myCounter = new Countdown({
    seconds: 3,
    onUpdateStatus: function(e) {
        document.getElementById("timer").innerHTML = e
    },
    onCounterEnd: function() {
        document.getElementById("countdown").className = "countdown end";
        document.getElementById("btn-main").className = "btn btn-main"
    }
});
myCounter.start()

jspenguin2017 avatar May 01 '17 22:05 jspenguin2017

I think this would work:

a.noAccess("Countdown");
a.ready(function () {
    a.$("countdown").removeClass().addClass("countdown end");
    a.$("btn-main").removeClass().addClass("btn btn-main");
});

jspenguin2017 avatar May 01 '17 22:05 jspenguin2017

That freezes the countdown and the get link remains inactive.

uBlock-user avatar May 02 '17 09:05 uBlock-user

Hum, I think we also need to clear existing classes. I'll test it out later.

jspenguin2017 avatar May 02 '17 16:05 jspenguin2017

This removes popup and countdown:

if (a.domCmp(["ouo.io"])) {
    a.win.localStorage.setItem("snapLastPopAt", (new a.win.Date()).getTime());
    a.timewarp("setInterval", a.matchMethod.stringExact, "1000");
}

jspenguin2017 avatar May 14 '17 18:05 jspenguin2017

@jspenguin2017 Same rule as https://github.com/jspenguin2017/uBlockProtector/issues/170#issuecomment-301329533 for ouo.press

http://ouo.press/sxiwwn

lain566 avatar Sep 09 '17 22:09 lain566

http://ouo.press/js/pop.t.js JsPopunder Add rule for ouo.press

lain566 avatar Sep 15 '17 13:09 lain566

New popups have appeared for both domains

lain566 avatar Oct 06 '17 22:10 lain566

@jspenguin2017 Can you implement this bypasser for ouo?

manifest.json
        {
            "run_at": "document_start",
            "matches": [
                "*://*.ouo.io/*",
                "*://*.ouo.press/*"
            ],
            "js": [
                "js/sites/ouo.js"
            ]
        },
js/sites/ouo.js
var url = document.URL.split('/')[3];
document.write('<form id="formtoid" method="POST" action="http://ouo.io/rgo/' + url + '" accept-charset="UTF-8"><input name="_token" type="hidden" value="EAuykxGRRnwaEegFapn51CZk5hcwHMsFYx02Ia7j"><button type="submit" style="display:none" id="btn-main" class="btn btn-main">Get Link</button></form>');
document.getElementById('formtoid')
    .submit();

lain566 avatar Oct 14 '17 11:10 lain566

Done.

jspenguin2017 avatar Oct 14 '17 14:10 jspenguin2017