1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-06 09:37:12 +02:00

Remove now irrelevant scoping

This commit is contained in:
Raymond Hill 2022-11-29 12:00:38 -05:00
parent 64909c671f
commit 15450e3957
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -32,19 +32,15 @@ import {
/******************************************************************************/ /******************************************************************************/
(( ) => { // Canonical name-uncloaking feature.
// https://github.com/uBlockOrigin/uBlock-issues/issues/407 let cnameUncloakEnabled = browser.dns instanceof Object;
if ( vAPI.webextFlavor.soup.has('firefox') === false ) { return; } let cnameUncloakProxied = false;
// Canonical name-uncloaking feature. // https://github.com/uBlockOrigin/uBlock-issues/issues/911
let cnameUncloakEnabled = browser.dns instanceof Object; // We detect here whether network requests are proxied, and if so,
let cnameUncloakProxied = false; // de-aliasing of hostnames will be disabled to avoid possible
// DNS leaks.
// https://github.com/uBlockOrigin/uBlock-issues/issues/911 const proxyDetector = function(details) {
// We detect here whether network requests are proxied, and if so,
// de-aliasing of hostnames will be disabled to avoid possible
// DNS leaks.
const proxyDetector = function(details) {
if ( details.proxyInfo instanceof Object ) { if ( details.proxyInfo instanceof Object ) {
cnameUncloakEnabled = false; cnameUncloakEnabled = false;
proxyDetectorTryCount = 0; proxyDetectorTryCount = 0;
@ -54,17 +50,17 @@ import {
return; return;
} }
proxyDetectorTryCount -= 1; proxyDetectorTryCount -= 1;
}; };
let proxyDetectorTryCount = 0; let proxyDetectorTryCount = 0;
// Related issues: // Related issues:
// - https://github.com/gorhill/uBlock/issues/1327 // - https://github.com/gorhill/uBlock/issues/1327
// - https://github.com/uBlockOrigin/uBlock-issues/issues/128 // - https://github.com/uBlockOrigin/uBlock-issues/issues/128
// - https://bugzilla.mozilla.org/show_bug.cgi?id=1503721 // - https://bugzilla.mozilla.org/show_bug.cgi?id=1503721
// Extend base class to normalize as per platform. // Extend base class to normalize as per platform.
vAPI.Net = class extends vAPI.Net { vAPI.Net = class extends vAPI.Net {
constructor() { constructor() {
super(); super();
this.pendingRequests = []; this.pendingRequests = [];
@ -303,7 +299,6 @@ import {
static canSuspend() { static canSuspend() {
return true; return true;
} }
}; };
})();
/******************************************************************************/ /******************************************************************************/