mirror of https://github.com/gorhill/uBlock.git
Add queue-related initialization code to AMZN shim script
This would render obsolete the AMZN-related exception at the following URL: https://play.mylifetime.com/shows/married-at-first-sight/season-15/episode-1 And possibly lower the likelihood of breakage on other sites.
This commit is contained in:
parent
db992b6f4a
commit
e62604f889
|
@ -23,13 +23,18 @@
|
|||
// https://github.com/NanoMeow/QuickReports/issues/3717
|
||||
// https://www.reddit.com/r/uBlockOrigin/comments/qyx7en/
|
||||
|
||||
// https://searchfox.org/mozilla-central/source/browser/extensions/webcompat/shims/apstag.js
|
||||
// Import queue-related initialization code.
|
||||
|
||||
(function() {
|
||||
'use strict';
|
||||
const w = window;
|
||||
const noopfn = function() {
|
||||
; // jshint ignore:line
|
||||
}.bind();
|
||||
const _Q = w.apstag && w.apstag._Q || [];
|
||||
const apstag = {
|
||||
_Q,
|
||||
fetchBids: function(a, b) {
|
||||
if ( typeof b === 'function' ) {
|
||||
b([]);
|
||||
|
@ -40,4 +45,18 @@
|
|||
targetingKeys: noopfn,
|
||||
};
|
||||
w.apstag = apstag;
|
||||
_Q.push = function(prefix, args) {
|
||||
try {
|
||||
switch (prefix) {
|
||||
case 'f':
|
||||
apstag.fetchBids(...args);
|
||||
break;
|
||||
}
|
||||
} catch (e) {
|
||||
console.trace(e);
|
||||
}
|
||||
};
|
||||
for ( const cmd of _Q ) {
|
||||
_Q.push(cmd);
|
||||
}
|
||||
})();
|
||||
|
|
Loading…
Reference in New Issue