Closed jspenguin2017 closed 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()
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()
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");
});
That freezes the countdown and the get link remains inactive.
Hum, I think we also need to clear existing classes. I'll test it out later.
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 Same rule as https://github.com/jspenguin2017/uBlockProtector/issues/170#issuecomment-301329533 for ouo.press
http://ouo.press/js/pop.t.js JsPopunder Add rule for ouo.press
New popups have appeared for both domains
@jspenguin2017 Can you implement this bypasser for ouo?
Done.
Need to remove timer.
ouo.io/baozy8 ouo.io/qR1Fn ouo.press/qR1Fn ouo.press/PN6B4
Thanks to @lain566