jspenguin2017 / uBlockProtector

An anti-adblock defuser for Nano Adblocker and uBlock Origin
GNU General Public License v3.0
740 stars 83 forks source link

ouo.io #170

Closed jspenguin2017 closed 7 years ago

jspenguin2017 commented 7 years ago

Need to remove timer.

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

Thanks to @lain566

uBlock-user commented 7 years ago

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()
jspenguin2017 commented 7 years ago

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 commented 7 years ago

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");
});
uBlock-user commented 7 years ago

That freezes the countdown and the get link remains inactive.

jspenguin2017 commented 7 years ago

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

jspenguin2017 commented 7 years ago

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");
}
lain566 commented 7 years ago

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

http://ouo.press/sxiwwn

lain566 commented 7 years ago

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

lain566 commented 7 years ago

New popups have appeared for both domains

lain566 commented 7 years ago

@jspenguin2017 Can you implement this bypasser for ouo?

manifest.json ```javascript { "run_at": "document_start", "matches": [ "*://*.ouo.io/*", "*://*.ouo.press/*" ], "js": [ "js/sites/ouo.js" ] }, ```
js/sites/ouo.js ```javascript var url = document.URL.split('/')[3]; document.write('
'); document.getElementById('formtoid') .submit(); ```
jspenguin2017 commented 7 years ago

Done.