1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-04 08:37:11 +02:00

guard against future instances of issue fixed in #3721

This commit is contained in:
Raymond Hill 2018-05-03 09:55:36 -04:00
parent 62fd1fe44f
commit 8be1aed04d
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
17 changed files with 353 additions and 26 deletions

View File

@ -1,7 +1,7 @@
/******************************************************************************* /*******************************************************************************
uBlock Origin - a browser extension to block requests. uBlock Origin - a browser extension to block requests.
Copyright (C) 2014-2017 The uBlock Origin authors Copyright (C) 2014-2018 The uBlock Origin authors
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -28,7 +28,8 @@
// https://github.com/chrisaljoudi/uBlock/issues/456 // https://github.com/chrisaljoudi/uBlock/issues/456
// Skip if already injected. // Skip if already injected.
if ( typeof vAPI === 'object' && !vAPI.clientScript ) { // >>>>>>>> start of HUGE-IF-BLOCK // >>>>>>>> start of HUGE-IF-BLOCK
if ( typeof vAPI === 'object' && !vAPI.clientScript ) {
/******************************************************************************/ /******************************************************************************/
/******************************************************************************/ /******************************************************************************/
@ -444,4 +445,25 @@ vAPI.shutdown.add(function() {
/******************************************************************************/ /******************************************************************************/
/******************************************************************************/ /******************************************************************************/
} // <<<<<<<< end of HUGE-IF-BLOCK }
// <<<<<<<< end of HUGE-IF-BLOCK
/*******************************************************************************
DO NOT:
- Remove the following code
- Add code beyond the following code
Reason:
- https://github.com/gorhill/uBlock/pull/3721
- uBO never uses the return value from injected content scripts
**/
void 0;

View File

@ -212,4 +212,22 @@ vAPI.localStorage = {
})(this); })(this);
/******************************************************************************/
/*******************************************************************************
DO NOT:
- Remove the following code
- Add code beyond the following code
Reason:
- https://github.com/gorhill/uBlock/pull/3721
- uBO never uses the return value from injected content scripts
**/
void 0;

View File

@ -32,3 +32,23 @@ if ( typeof vAPI === 'object' ) {
vAPI.supportsUserStylesheets = vAPI.supportsUserStylesheets =
/\bChrom(?:e|ium)\/(?:6[6789]|[789]|1\d\d)/.test(navigator.userAgent); /\bChrom(?:e|ium)\/(?:6[6789]|[789]|1\d\d)/.test(navigator.userAgent);
} }
/*******************************************************************************
DO NOT:
- Remove the following code
- Add code beyond the following code
Reason:
- https://github.com/gorhill/uBlock/pull/3721
- uBO never uses the return value from injected content scripts
**/
void 0;

View File

@ -24,8 +24,8 @@
// Packaging this file is optional: it is not necessary to package it if the // Packaging this file is optional: it is not necessary to package it if the
// platform is known to support user stylesheets. // platform is known to support user stylesheets.
if ( typeof vAPI === 'object' && vAPI.userStylesheet === undefined ) {
// >>>>>>>> start of HUGE-IF-BLOCK // >>>>>>>> start of HUGE-IF-BLOCK
if ( typeof vAPI === 'object' && vAPI.userStylesheet === undefined ) {
/******************************************************************************/ /******************************************************************************/
/******************************************************************************/ /******************************************************************************/
@ -541,5 +541,25 @@ vAPI.DOMFilterer.prototype = {
/******************************************************************************/ /******************************************************************************/
/******************************************************************************/ /******************************************************************************/
// <<<<<<<< end of HUGE-IF-BLOCK
} }
// <<<<<<<< end of HUGE-IF-BLOCK
/*******************************************************************************
DO NOT:
- Remove the following code
- Add code beyond the following code
Reason:
- https://github.com/gorhill/uBlock/pull/3721
- uBO never uses the return value from injected content scripts
**/
void 0;

View File

@ -24,8 +24,8 @@
// Packaging this file is optional: it is not necessary to package it if the // Packaging this file is optional: it is not necessary to package it if the
// platform is known to not support user stylesheets. // platform is known to not support user stylesheets.
if ( typeof vAPI === 'object' && vAPI.supportsUserStylesheets ) {
// >>>>>>>> start of HUGE-IF-BLOCK // >>>>>>>> start of HUGE-IF-BLOCK
if ( typeof vAPI === 'object' && vAPI.supportsUserStylesheets ) {
/******************************************************************************/ /******************************************************************************/
/******************************************************************************/ /******************************************************************************/
@ -239,5 +239,25 @@ vAPI.DOMFilterer.prototype = {
/******************************************************************************/ /******************************************************************************/
/******************************************************************************/ /******************************************************************************/
// <<<<<<<< end of HUGE-IF-BLOCK
} }
// <<<<<<<< end of HUGE-IF-BLOCK
/*******************************************************************************
DO NOT:
- Remove the following code
- Add code beyond the following code
Reason:
- https://github.com/gorhill/uBlock/pull/3721
- uBO never uses the return value from injected content scripts
**/
void 0;

View File

@ -1,7 +1,7 @@
/******************************************************************************* /*******************************************************************************
uBlock Origin - a browser extension to block requests. uBlock Origin - a browser extension to block requests.
Copyright (C) 2017 The uBlock Origin authors Copyright (C) 2017-2018 The uBlock Origin authors
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -53,8 +53,22 @@ if (
: { uBO: true }; : { uBO: true };
} }
// Set the value of the last expression to undefined to avoid serializing the
// vAPI object when the content script is run using chrome.tabs.executeScript.
void 0;
/******************************************************************************/
/*******************************************************************************
DO NOT:
- Remove the following code
- Add code beyond the following code
Reason:
- https://github.com/gorhill/uBlock/pull/3721
- uBO never uses the return value from injected content scripts
**/
void 0;

View File

@ -26,3 +26,23 @@
if ( typeof vAPI === 'object' ) { if ( typeof vAPI === 'object' ) {
vAPI.supportsUserStylesheets = true; vAPI.supportsUserStylesheets = true;
} }
/*******************************************************************************
DO NOT:
- Remove the following code
- Add code beyond the following code
Reason:
- https://github.com/gorhill/uBlock/pull/3721
- uBO never uses the return value from injected content scripts
**/
void 0;

View File

@ -32,3 +32,23 @@ if ( typeof vAPI === 'object' ) {
vAPI.supportsUserStylesheets = vAPI.supportsUserStylesheets =
/\bChrom(?:e|ium)\/(?:6[6789]|[789]|1\d\d)|\bFirefox\/\d/.test(navigator.userAgent); /\bChrom(?:e|ium)\/(?:6[6789]|[789]|1\d\d)|\bFirefox\/\d/.test(navigator.userAgent);
} }
/*******************************************************************************
DO NOT:
- Remove the following code
- Add code beyond the following code
Reason:
- https://github.com/gorhill/uBlock/pull/3721
- uBO never uses the return value from injected content scripts
**/
void 0;

View File

@ -1,7 +1,7 @@
/******************************************************************************* /*******************************************************************************
uBlock Origin - a browser extension to block requests. uBlock Origin - a browser extension to block requests.
Copyright (C) 2015-2017 Raymond Hill Copyright (C) 2015-2018 Raymond Hill
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -252,3 +252,24 @@ vAPI.domWatcher.addListener(handlers);
/******************************************************************************/ /******************************************************************************/
})(); })();
/*******************************************************************************
DO NOT:
- Remove the following code
- Add code beyond the following code
Reason:
- https://github.com/gorhill/uBlock/pull/3721
- uBO never uses the return value from injected content scripts
**/
void 0;

View File

@ -1,7 +1,7 @@
/******************************************************************************* /*******************************************************************************
uBlock Origin - a browser extension to block requests. uBlock Origin - a browser extension to block requests.
Copyright (C) 2015-2017 Raymond Hill Copyright (C) 2015-2018 Raymond Hill
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -26,3 +26,23 @@
if ( typeof vAPI === 'object' && vAPI.domFilterer ) { if ( typeof vAPI === 'object' && vAPI.domFilterer ) {
vAPI.domFilterer.toggle(false); vAPI.domFilterer.toggle(false);
} }
/*******************************************************************************
DO NOT:
- Remove the following code
- Add code beyond the following code
Reason:
- https://github.com/gorhill/uBlock/pull/3721
- uBO never uses the return value from injected content scripts
**/
void 0;

View File

@ -1,7 +1,7 @@
/******************************************************************************* /*******************************************************************************
uBlock Origin - a browser extension to block requests. uBlock Origin - a browser extension to block requests.
Copyright (C) 2015-2017 Raymond Hill Copyright (C) 2015-2018 Raymond Hill
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -26,3 +26,23 @@
if ( typeof vAPI === 'object' && vAPI.domFilterer ) { if ( typeof vAPI === 'object' && vAPI.domFilterer ) {
vAPI.domFilterer.toggle(true); vAPI.domFilterer.toggle(true);
} }
/*******************************************************************************
DO NOT:
- Remove the following code
- Add code beyond the following code
Reason:
- https://github.com/gorhill/uBlock/pull/3721
- uBO never uses the return value from injected content scripts
**/
void 0;

View File

@ -1,7 +1,7 @@
/******************************************************************************* /*******************************************************************************
uBlock Origin - a browser extension to block requests. uBlock Origin - a browser extension to block requests.
Copyright (C) 2015-2017 Raymond Hill Copyright (C) 2015-2018 Raymond Hill
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -35,3 +35,23 @@
} }
); );
})(); })();
/*******************************************************************************
DO NOT:
- Remove the following code
- Add code beyond the following code
Reason:
- https://github.com/gorhill/uBlock/pull/3721
- uBO never uses the return value from injected content scripts
**/
void 0;

View File

@ -1,7 +1,7 @@
/******************************************************************************* /*******************************************************************************
uBlock Origin - a browser extension to block requests. uBlock Origin - a browser extension to block requests.
Copyright (C) 2015-2017 Raymond Hill Copyright (C) 2015-2018 Raymond Hill
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -989,4 +989,22 @@ document.documentElement.appendChild(pickerRoot);
})(); })();
/******************************************************************************/
/*******************************************************************************
DO NOT:
- Remove the following code
- Add code beyond the following code
Reason:
- https://github.com/gorhill/uBlock/pull/3721
- uBO never uses the return value from injected content scripts
**/
void 0;

View File

@ -1,7 +1,7 @@
/******************************************************************************* /*******************************************************************************
uBlock Origin - a browser extension to block requests. uBlock Origin - a browser extension to block requests.
Copyright (C) 2014-2017 Raymond Hill Copyright (C) 2014-2018 Raymond Hill
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -1658,3 +1658,23 @@ document.documentElement.appendChild(pickerRoot);
/******************************************************************************/ /******************************************************************************/
})(); })();
/*******************************************************************************
DO NOT:
- Remove the following code
- Add code beyond the following code
Reason:
- https://github.com/gorhill/uBlock/pull/3721
- uBO never uses the return value from injected content scripts
**/
void 0;

View File

@ -1,7 +1,7 @@
/******************************************************************************* /*******************************************************************************
uBlock Origin - a browser extension to block requests. uBlock Origin - a browser extension to block requests.
Copyright (C) 2015 Raymond Hill Copyright (C) 2015-2018 Raymond Hill
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -67,4 +67,22 @@ while ( i-- ) {
})(); })();
/******************************************************************************/
/*******************************************************************************
DO NOT:
- Remove the following code
- Add code beyond the following code
Reason:
- https://github.com/gorhill/uBlock/pull/3721
- uBO never uses the return value from injected content scripts
**/
void 0;

View File

@ -1,7 +1,7 @@
/******************************************************************************* /*******************************************************************************
uBlock Origin - a browser extension to block requests. uBlock Origin - a browser extension to block requests.
Copyright (C) 2015-2016 Raymond Hill Copyright (C) 2015-2018 Raymond Hill
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -221,4 +221,22 @@ vAPI.shutdown.add(function() {
})(); })();
/******************************************************************************/
/*******************************************************************************
DO NOT:
- Remove the following code
- Add code beyond the following code
Reason:
- https://github.com/gorhill/uBlock/pull/3721
- uBO never uses the return value from injected content scripts
**/
void 0;

View File

@ -1,7 +1,7 @@
/******************************************************************************* /*******************************************************************************
uBlock Origin - a browser extension to block requests. uBlock Origin - a browser extension to block requests.
Copyright (C) 2015-2017 Raymond Hill Copyright (C) 2015-2018 Raymond Hill
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -122,4 +122,22 @@ setTimeout(function() {
})(); })();
/******************************************************************************/
/*******************************************************************************
DO NOT:
- Remove the following code
- Add code beyond the following code
Reason:
- https://github.com/gorhill/uBlock/pull/3721
- uBO never uses the return value from injected content scripts
**/
void 0;