1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-08 04:49:12 +02:00
gorhill 2016-03-12 12:07:13 -05:00
parent f8b96493ee
commit ad99bf52e0
3 changed files with 52 additions and 40 deletions

View File

@ -1,11 +1,11 @@
538211a2228745b51b615b1b245cf99e assets/ublock/unbreak.txt
62111a29f0a5cb361ba8dbae92054adb assets/ublock/redirect-resources.txt
94efb2d9c4bd436707c3923d64cb4f3b assets/ublock/privacy.txt
833029ec1b30bf73b0892e96b7a42b8d assets/ublock/filters.txt
d9fcd484d3b1be1954bcb9252048ca14 assets/ublock/filters.txt
98088252cedafb8571cf61b91bea219e assets/ublock/badware.txt
5baa90e2da7cd6a73edff2010557ee57 assets/ublock/redirect.txt
b65ec581214a0d24dad6522a60f827ab assets/ublock/experimental.txt
5c2833757e36427abe50aaff4e092dc4 assets/ublock/resources.txt
f96952a8e31a72e43e0f7755f6d8bcf1 assets/ublock/resources.txt
059e0bfbf22bd242dda7b07389fe09a2 assets/ublock/filter-lists.json
3605c73f21abca428c7eb69a8bc32dfe assets/thirdparties/easylist-downloads.adblockplus.org/easyprivacy.txt
a91af77c47c302c0741c7445b0fada1a assets/thirdparties/easylist-downloads.adblockplus.org/easylist.txt

View File

@ -258,6 +258,7 @@ extremetube.com,pornhub.com,primewire.*,redtube.*,spankwire.com,tube8.*,youporn.
||dailymotion.com/ac/video/$image,first-party,redirect=2x2-transparent.png
# https://github.com/gorhill/uBlock/issues/1136#issuecomment-170371863
dailymotion.com##script:inject(1136.js)
||liverail.com^$important,domain=dailymotion.com
# https://news.ycombinator.com/item?id=10814913
forbes.com##script:inject(forbes-defuser.js)

View File

@ -539,18 +539,29 @@ openload-defuser.js application/javascript
var noopfn = function() {
;
};
var excludes = ['157','161','175'];
var excludes = {
'4': ['157','161','175'],
'5': ['140']
};
var wjdmpGet = function() {
return wjdmp;
};
var wjdmpSet = function(a) {
wjdmp = function(r, o) {
if ( r.length === 1 && r[0] === 4 ) {
var aa;
for ( var excl in excludes ) {
if ( excludes.hasOwnProperty(excl) === false ) {
continue;
}
if ( r.length !== 1 || r[0].toString() !== excl ) {
continue;
}
aa = excludes[excl];
for ( var k in o ) {
if ( !o.hasOwnProperty(k) || typeof o[k] !== 'function' ) {
continue;
}
if ( excludes.indexOf(k.toString()) !== -1 ) {
if ( aa.length !== 0 && aa.indexOf(k.toString()) !== -1 ) {
continue;
}
o[k] = noopfn;
@ -762,44 +773,44 @@ setTimeout-defuser application/javascript
# Sometimes a site will use this one script:
disqus.com/forums/*/embed.js application/javascript
(function() {
var ee = document.getElementsByTagName('script');
var i = ee.length, src;
while ( i-- ) {
src = ee[i].src || '';
if ( src === '' ) {
continue;
}
if ( src.lastIndexOf('disqus.com/embed.js') === (src.length - 19) ) {
return;
}
}
var e = document.createElement('script');
e.async = true;
e.src = '//' + window.disqus_shortname + '.disqus.com/embed.js';
document.body.appendChild(e);
var ee = document.getElementsByTagName('script');
var i = ee.length, src;
while ( i-- ) {
src = ee[i].src || '';
if ( src === '' ) {
continue;
}
if ( src.lastIndexOf('disqus.com/embed.js') === (src.length - 19) ) {
return;
}
}
var e = document.createElement('script');
e.async = true;
e.src = '//' + window.disqus_shortname + '.disqus.com/embed.js';
document.body.appendChild(e);
})();
# Most use this one though:
disqus.com/embed.js application/javascript
(function() {
var p = document.getElementById(window.disqus_container_id || 'disqus_thread');
if ( p === null ) {
return;
}
var b = document.createElement('button');
b.textContent = 'Disqus blocked by uBlock Origin: click to unblock';
b.type = 'button';
p.appendChild(b);
var loadDisqus = function(ev) {
b.removeEventListener('click', loadDisqus);
p.removeChild(b);
var script = document.createElement('script');
script.async = true;
var t = Date.now().toString();
script.src = '//' + window.disqus_shortname + '.disqus.com/embed.js?_=1457540' + t.slice(-6);
document.body.appendChild(script);
ev.preventDefault();
ev.stopPropagation();
};
b.addEventListener('click', loadDisqus);
var p = document.getElementById(window.disqus_container_id || 'disqus_thread');
if ( p === null ) {
return;
}
var b = document.createElement('button');
b.textContent = 'Disqus blocked by uBlock Origin: click to unblock';
b.type = 'button';
p.appendChild(b);
var loadDisqus = function(ev) {
b.removeEventListener('click', loadDisqus);
p.removeChild(b);
var script = document.createElement('script');
script.async = true;
var t = Date.now().toString();
script.src = '//' + window.disqus_shortname + '.disqus.com/embed.js?_=1457540' + t.slice(-6);
document.body.appendChild(script);
ev.preventDefault();
ev.stopPropagation();
};
b.addEventListener('click', loadDisqus);
})();