diff options
author | gorhill <rhill@raymondhill.net> | 2015-04-27 10:54:13 -0400 |
---|---|---|
committer | gorhill <rhill@raymondhill.net> | 2015-04-27 10:54:13 -0400 |
commit | 600fa2c3d9f6d93779ea626a96345a9fc63631b6 (patch) | |
tree | 70da9b4178c14fab4014129cdcccafbd7d7714b5 | |
parent | 28fbda660757961189b8bff25144dc45e2685b0f (diff) | |
download | uBlock-600fa2c3d9f6d93779ea626a96345a9fc63631b6.zip uBlock-600fa2c3d9f6d93779ea626a96345a9fc63631b6.tar.gz uBlock-600fa2c3d9f6d93779ea626a96345a9fc63631b6.tar.bz2 |
this fixes #135
-rw-r--r-- | src/js/background.js | 2 | ||||
-rw-r--r-- | src/js/start.js | 10 | ||||
-rw-r--r-- | src/js/tab.js | 8 |
3 files changed, 17 insertions, 3 deletions
diff --git a/src/js/background.js b/src/js/background.js index 7cec3ed..3d335ee 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -72,9 +72,11 @@ return { netWhitelist: {}, netWhitelistModifyTime: 0, netWhitelistDefault: [ + 'about-scheme', 'behind-the-scene', 'chrome-extension-scheme', 'chrome-scheme', + 'loopconversation.about-scheme', 'opera-scheme', '' ].join('\n').trim(), diff --git a/src/js/start.js b/src/js/start.js index f335dc0..911f7e3 100644 --- a/src/js/start.js +++ b/src/js/start.js @@ -81,6 +81,16 @@ var onVersionReady = function(lastVersion) { ); µb.saveWhitelist(); } + // https://github.com/gorhill/uBlock/issues/135#issuecomment-96677379 + // `about:loopconversation` is used by Firefox for its Hello service + if ( lastVersion.localeCompare('0.9.5.2') < 0 ) { + µb.netWhitelist = µb.whitelistFromString( + µb.stringFromWhitelist(µb.netWhitelist) + + '\n' + + 'loopconversation.about-scheme' + ); + µb.saveWhitelist(); + } if ( lastVersion !== vAPI.app.version ) { vAPI.storage.set({ version: vAPI.app.version }); } diff --git a/src/js/tab.js b/src/js/tab.js index c84f6fa..af4a9f2 100644 --- a/src/js/tab.js +++ b/src/js/tab.js @@ -55,13 +55,15 @@ var µb = µBlock; return uri.normalizedURI(); } - var url = 'http://' + scheme + '-scheme/'; + var fakeHostname = scheme + '-scheme'; if ( uri.hostname !== '' ) { - url += uri.hostname + '/'; + fakeHostname = uri.hostname + '.' + fakeHostname; + } else if ( scheme === 'about' && uri.path !== '' ) { + fakeHostname = uri.path + '.' + fakeHostname; } - return url; + return 'http://' + fakeHostname + '/'; }; /******************************************************************************/ |