mirror of https://github.com/gorhill/uBlock.git
this fixes dm
This commit is contained in:
parent
d8455f81e3
commit
5b5c661e0d
|
@ -5,7 +5,7 @@ a1bbb634b15518cb2916bfdc78fd4344 assets/ublock/unbreak.txt
|
||||||
146704ad1c0393e342afdb416762c183 assets/ublock/badware.txt
|
146704ad1c0393e342afdb416762c183 assets/ublock/badware.txt
|
||||||
5baa90e2da7cd6a73edff2010557ee57 assets/ublock/redirect.txt
|
5baa90e2da7cd6a73edff2010557ee57 assets/ublock/redirect.txt
|
||||||
a2c0edc2da6a2ba591d83f9a105a8401 assets/ublock/experimental.txt
|
a2c0edc2da6a2ba591d83f9a105a8401 assets/ublock/experimental.txt
|
||||||
0a8d548c42652b0303ab35d4e4fe0852 assets/ublock/resources.txt
|
4d7a4dae5294ea40b0af1bd184806308 assets/ublock/resources.txt
|
||||||
fd3bf1065012191e032f81468de43e09 assets/ublock/filter-lists.json
|
fd3bf1065012191e032f81468de43e09 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
|
||||||
|
|
|
@ -527,6 +527,7 @@ openload-defuser.js application/javascript
|
||||||
var noopfn = function() {
|
var noopfn = function() {
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
|
var excludes = ['177'];
|
||||||
var wjdmpGet = function() {
|
var wjdmpGet = function() {
|
||||||
return wjdmp;
|
return wjdmp;
|
||||||
};
|
};
|
||||||
|
@ -535,8 +536,12 @@ openload-defuser.js application/javascript
|
||||||
if ( r.length === 1 && r[0] === 4 ) {
|
if ( r.length === 1 && r[0] === 4 ) {
|
||||||
for ( var k in o ) {
|
for ( var k in o ) {
|
||||||
if ( o.hasOwnProperty(k) && typeof o[k] === 'function' ) {
|
if ( o.hasOwnProperty(k) && typeof o[k] === 'function' ) {
|
||||||
o[k] = noopfn;
|
continue;
|
||||||
}
|
}
|
||||||
|
if ( excludes.indexOf(k) !== -1 ) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
o[k] = noopfn;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
a(r, o);
|
a(r, o);
|
||||||
|
@ -593,44 +598,25 @@ widgets.outbrain.com/outbrain.js application/javascript
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
var obr = {};
|
var obr = {};
|
||||||
|
var methods = [
|
||||||
|
'callClick', 'callLoadMore', 'callRecs', 'callUserZapping',
|
||||||
|
'callWhatIs', 'cancelRecommendation', 'cancelRecs', 'closeCard',
|
||||||
|
'closeModal', 'closeTbx', 'errorInjectionHandler', 'getCountOfRecs',
|
||||||
|
'getStat', 'imageError', 'manualVideoClicked', 'onOdbReturn',
|
||||||
|
'onVideoClick', 'pagerLoad', 'recClicked', 'refreshSpecificWidget',
|
||||||
|
'refreshWidget', 'reloadWidget', 'researchWidget', 'returnedError',
|
||||||
|
'returnedHtmlData', 'returnedIrdData', 'returnedJsonData', 'scrollLoad',
|
||||||
|
'showDescription', 'showRecInIframe', 'userZappingMessage', 'zappingFormAction'
|
||||||
|
];
|
||||||
obr.extern = {
|
obr.extern = {
|
||||||
callClick: noopfn,
|
|
||||||
callLoadMore: noopfn,
|
|
||||||
callRecs: noopfn,
|
|
||||||
callUserZapping: noopfn,
|
|
||||||
callWhatIs: noopfn,
|
|
||||||
cancelRecommendation: noopfn,
|
|
||||||
cancelRecs: noopfn,
|
|
||||||
closeCard: noopfn,
|
|
||||||
closeModal: noopfn,
|
|
||||||
closeTbx: noopfn,
|
|
||||||
errorInjectionHandler: noopfn,
|
|
||||||
getCountOfRecs: noopfn,
|
|
||||||
getStat: noopfn,
|
|
||||||
imageError: noopfn,
|
|
||||||
manualVideoClicked: noopfn,
|
|
||||||
onOdbReturn: noopfn,
|
|
||||||
onVideoClick: noopfn,
|
|
||||||
pagerLoad: noopfn,
|
|
||||||
recClicked: noopfn,
|
|
||||||
refreshSpecificWidget: noopfn,
|
|
||||||
refreshWidget: noopfn,
|
|
||||||
reloadWidget: noopfn,
|
|
||||||
researchWidget: noopfn,
|
|
||||||
returnedError: noopfn,
|
|
||||||
returnedHtmlData: noopfn,
|
|
||||||
returnedIrdData: noopfn,
|
|
||||||
returnedJsonData: noopfn,
|
|
||||||
scrollLoad: noopfn,
|
|
||||||
showDescription: noopfn,
|
|
||||||
showRecInIframe: noopfn,
|
|
||||||
userZappingMessage: noopfn,
|
|
||||||
video: {
|
video: {
|
||||||
getVideoRecs: noopfn,
|
getVideoRecs: noopfn,
|
||||||
videoClicked: noopfn
|
videoClicked: noopfn
|
||||||
},
|
}
|
||||||
zappingFormAction: noopfn
|
|
||||||
};
|
};
|
||||||
|
methods.forEach(function(a) {
|
||||||
|
obr.extern[a] = noopfn;
|
||||||
|
});
|
||||||
window.OBR = window.OBR || obr;
|
window.OBR = window.OBR || obr;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
|
@ -317,17 +317,6 @@ MessagingChannel.prototype.sendToListeners = function(msg) {
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
// No need to have vAPI client linger around after shutdown if
|
|
||||||
// we are not a top window (because element picker can still
|
|
||||||
// be injected in top window).
|
|
||||||
if ( window !== window.top ) {
|
|
||||||
vAPI.shutdown.add(function() {
|
|
||||||
vAPI = null;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
|
|
||||||
})(this);
|
})(this);
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
|
@ -73,11 +73,10 @@ var uBlockCollapser = (function() {
|
||||||
var timer = null;
|
var timer = null;
|
||||||
var requestId = 1;
|
var requestId = 1;
|
||||||
var newRequests = [];
|
var newRequests = [];
|
||||||
var pendingRequests = {};
|
var pendingRequests = Object.create(null);
|
||||||
var pendingRequestCount = 0;
|
var pendingRequestCount = 0;
|
||||||
var src1stProps = {
|
var src1stProps = {
|
||||||
'embed': 'src',
|
'embed': 'src',
|
||||||
'iframe': 'src',
|
|
||||||
'img': 'src',
|
'img': 'src',
|
||||||
'object': 'data'
|
'object': 'data'
|
||||||
};
|
};
|
||||||
|
@ -119,10 +118,10 @@ var uBlockCollapser = (function() {
|
||||||
var request, entry, target, value;
|
var request, entry, target, value;
|
||||||
while ( i-- ) {
|
while ( i-- ) {
|
||||||
request = requests[i];
|
request = requests[i];
|
||||||
if ( pendingRequests.hasOwnProperty(request.id) === false ) {
|
entry = pendingRequests[request.id];
|
||||||
|
if ( entry === undefined ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
entry = pendingRequests[request.id];
|
|
||||||
delete pendingRequests[request.id];
|
delete pendingRequests[request.id];
|
||||||
pendingRequestCount -= 1;
|
pendingRequestCount -= 1;
|
||||||
|
|
||||||
|
@ -154,7 +153,7 @@ var uBlockCollapser = (function() {
|
||||||
// Renew map: I believe that even if all properties are deleted, an
|
// Renew map: I believe that even if all properties are deleted, an
|
||||||
// object will still use more memory than a brand new one.
|
// object will still use more memory than a brand new one.
|
||||||
if ( pendingRequestCount === 0 ) {
|
if ( pendingRequestCount === 0 ) {
|
||||||
pendingRequests = {};
|
pendingRequests = Object.create(null);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -210,6 +209,13 @@ var uBlockCollapser = (function() {
|
||||||
newRequests.push(new BouncingRequest(req.id, tagName, src));
|
newRequests.push(new BouncingRequest(req.id, tagName, src));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var addMany = function(targets) {
|
||||||
|
var i = targets.length;
|
||||||
|
while ( i-- ) {
|
||||||
|
add(targets[i]);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
var iframeSourceModified = function(mutations) {
|
var iframeSourceModified = function(mutations) {
|
||||||
var i = mutations.length;
|
var i = mutations.length;
|
||||||
while ( i-- ) {
|
while ( i-- ) {
|
||||||
|
@ -254,21 +260,26 @@ var uBlockCollapser = (function() {
|
||||||
newRequests.push(new BouncingRequest(req.id, 'iframe', src));
|
newRequests.push(new BouncingRequest(req.id, 'iframe', src));
|
||||||
};
|
};
|
||||||
|
|
||||||
var iframesFromNode = function(node) {
|
var addIFrames = function(iframes) {
|
||||||
if ( node.localName === 'iframe' ) {
|
|
||||||
addIFrame(node);
|
|
||||||
}
|
|
||||||
var iframes = node.getElementsByTagName('iframe');
|
|
||||||
var i = iframes.length;
|
var i = iframes.length;
|
||||||
while ( i-- ) {
|
while ( i-- ) {
|
||||||
addIFrame(iframes[i]);
|
addIFrame(iframes[i]);
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var iframesFromNode = function(node) {
|
||||||
|
if ( node.localName === 'iframe' ) {
|
||||||
|
addIFrame(node);
|
||||||
|
}
|
||||||
|
addIFrames(node.getElementsByTagName('iframe'));
|
||||||
process();
|
process();
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
add: add,
|
add: add,
|
||||||
|
addMany: addMany,
|
||||||
addIFrame: addIFrame,
|
addIFrame: addIFrame,
|
||||||
|
addIFrames: addIFrames,
|
||||||
iframesFromNode: iframesFromNode,
|
iframesFromNode: iframesFromNode,
|
||||||
process: process
|
process: process
|
||||||
};
|
};
|
||||||
|
@ -925,35 +936,17 @@ var uBlockCollapser = (function() {
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
var collapser = uBlockCollapser;
|
var collapser = uBlockCollapser;
|
||||||
var elems, i, elem;
|
var elems = document.getElementsByTagName('img'),
|
||||||
|
i = elems.length, elem;
|
||||||
elems = document.getElementsByTagName('embed');
|
|
||||||
i = elems.length;
|
|
||||||
while ( i-- ) {
|
|
||||||
collapser.add(elems[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
elems = document.getElementsByTagName('object');
|
|
||||||
i = elems.length;
|
|
||||||
while ( i-- ) {
|
|
||||||
collapser.add(elems[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
elems = document.getElementsByTagName('img');
|
|
||||||
i = elems.length;
|
|
||||||
while ( i-- ) {
|
while ( i-- ) {
|
||||||
elem = elems[i];
|
elem = elems[i];
|
||||||
if ( elem.complete ) {
|
if ( elem.complete ) {
|
||||||
collapser.add(elem);
|
collapser.add(elem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
collapser.addMany(document.getElementsByTagName('embed'));
|
||||||
elems = document.getElementsByTagName('iframe');
|
collapser.addMany(document.getElementsByTagName('object'));
|
||||||
i = elems.length;
|
collapser.addIFrames(document.getElementsByTagName('iframe'));
|
||||||
while ( i-- ) {
|
|
||||||
collapser.addIFrame(elems[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
collapser.process(0);
|
collapser.process(0);
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue