mirror of https://github.com/gorhill/uBlock.git
#1461: hardened experimental scriplet
This commit is contained in:
parent
9ca616fefd
commit
3ed3c27277
|
@ -5,7 +5,7 @@ dcc881135f01d1e264c2be59a8aaa1e0 assets/ublock/filters.txt
|
||||||
98088252cedafb8571cf61b91bea219e assets/ublock/badware.txt
|
98088252cedafb8571cf61b91bea219e assets/ublock/badware.txt
|
||||||
5baa90e2da7cd6a73edff2010557ee57 assets/ublock/redirect.txt
|
5baa90e2da7cd6a73edff2010557ee57 assets/ublock/redirect.txt
|
||||||
b65ec581214a0d24dad6522a60f827ab assets/ublock/experimental.txt
|
b65ec581214a0d24dad6522a60f827ab assets/ublock/experimental.txt
|
||||||
36418463fe1f706e56e8f74371d1c12c assets/ublock/resources.txt
|
5ee3e1aa589018d7abf5978306e2c018 assets/ublock/resources.txt
|
||||||
059e0bfbf22bd242dda7b07389fe09a2 assets/ublock/filter-lists.json
|
059e0bfbf22bd242dda7b07389fe09a2 assets/ublock/filter-lists.json
|
||||||
3605c73f21abca428c7eb69a8bc32dfe assets/thirdparties/easylist-downloads.adblockplus.org/easyprivacy.txt
|
3605c73f21abca428c7eb69a8bc32dfe assets/thirdparties/easylist-downloads.adblockplus.org/easyprivacy.txt
|
||||||
a91af77c47c302c0741c7445b0fada1a assets/thirdparties/easylist-downloads.adblockplus.org/easylist.txt
|
a91af77c47c302c0741c7445b0fada1a assets/thirdparties/easylist-downloads.adblockplus.org/easylist.txt
|
||||||
|
|
|
@ -830,23 +830,50 @@ disqus.com/embed.js application/javascript
|
||||||
ytad-defuser.js application/javascript
|
ytad-defuser.js application/javascript
|
||||||
(function() {
|
(function() {
|
||||||
var ytp, ytpc;
|
var ytp, ytpc;
|
||||||
Object.defineProperty(window, 'ytplayer', {
|
var trapytpca = function() {
|
||||||
get: function() {
|
if ( ytpc && ytpc.args && typeof ytpc.args.ad_slots === 'string' ) {
|
||||||
return ytp;
|
ytpc.args.ad_slots = ytpc.args.ad_slots.replace(/^0+(,|$)/, '');
|
||||||
},
|
}
|
||||||
set: function(a) {
|
};
|
||||||
ytp = a;
|
var trapytpc = function() {
|
||||||
|
ytpc = ytp.config;
|
||||||
|
if ( ytpc ) {
|
||||||
|
trapytpca();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
Object.defineProperty(ytp, 'config', {
|
Object.defineProperty(ytp, 'config', {
|
||||||
get: function() {
|
get: function() {
|
||||||
return ytpc;
|
return ytpc;
|
||||||
},
|
},
|
||||||
set: function(a) {
|
set: function(a) {
|
||||||
ytpc = a;
|
ytpc = a;
|
||||||
if ( a && a.args && typeof a.args.ad_slots === 'string' ) {
|
trapytpca();
|
||||||
a.args.ad_slots = a.args.ad_slots.replace(/^0+(,|$)/, '');
|
}
|
||||||
|
});
|
||||||
|
} catch (ex) {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var trapytp = function() {
|
||||||
|
ytp = window.ytplayer;
|
||||||
|
if ( ytp ) {
|
||||||
|
trapytpc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
Object.defineProperty(window, 'ytplayer', {
|
||||||
|
get: function() {
|
||||||
|
return ytp;
|
||||||
|
},
|
||||||
|
set: function(a) {
|
||||||
|
ytp = a;
|
||||||
|
if ( !a.config ) {
|
||||||
|
trapytpc();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
} catch (ex) {
|
||||||
});
|
}
|
||||||
|
};
|
||||||
|
trapytp();
|
||||||
})();
|
})();
|
||||||
|
|
Loading…
Reference in New Issue