Skip to content

Commit 2c2dbfe

Browse files
committed
this addresses gorhill#1240 + minor code review
1 parent e5c2eff commit 2c2dbfe

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

assets/checksums.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
98088252cedafb8571cf61b91bea219e assets/ublock/badware.txt
66
5baa90e2da7cd6a73edff2010557ee57 assets/ublock/redirect.txt
77
b65ec581214a0d24dad6522a60f827ab assets/ublock/experimental.txt
8-
e10a9861e33cf8174611372d4eda38e3 assets/ublock/resources.txt
8+
b49ff635595425bdb99e53bdf7222cd7 assets/ublock/resources.txt
99
059e0bfbf22bd242dda7b07389fe09a2 assets/ublock/filter-lists.json
1010
3605c73f21abca428c7eb69a8bc32dfe assets/thirdparties/easylist-downloads.adblockplus.org/easyprivacy.txt
1111
a91af77c47c302c0741c7445b0fada1a assets/thirdparties/easylist-downloads.adblockplus.org/easylist.txt

assets/ublock/resources.txt

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ yavli-defuser.js application/javascript
409409
Object.defineProperty(window, '__lturl', nourl);
410410
} catch (ex) {
411411
}
412-
var aa = ['_x','_y','_z','pz','xz','yy','yz','zp','zx','zy','gj','fj'];
412+
var aa = ['_x','_y','_z','pz','xz','yy','yz','zp','zx','zy','gj','fj','jf'];
413413
var no = {
414414
set: noopfn,
415415
get: function() {
@@ -575,7 +575,7 @@ bab-defuser.js application/javascript
575575
re = /\.bab_elementid.$/;
576576
window.setTimeout = function(a, b) {
577577
if ( typeof a !== 'string' || !re.test(a) ) {
578-
sto(a, b);
578+
return sto(a, b);
579579
}
580580
};
581581
})();
@@ -702,7 +702,7 @@ wired-defuser.js application/javascript
702702
re = /^function n\(\)/;
703703
window.setTimeout = function(a, b) {
704704
if ( b !== 50 || !re.test(a.toString()) ) {
705-
sto(a, b);
705+
return sto(a, b);
706706
}
707707
};
708708
})();
@@ -735,3 +735,13 @@ opensubtitles.org application/javascript
735735
set: function(a) {}
736736
});
737737
})();
738+
739+
740+
# Might be useful on some sites to be able to foil all calls to `setTimeout`.
741+
# Example of a filter: `example.com##script:inject(setTimeout-defuser)`
742+
setTimeout-defuser application/javascript
743+
(function() {
744+
window.setTimeout = function() {
745+
return 1;
746+
};
747+
})();

0 commit comments

Comments
 (0)