1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-16 23:42:39 +01:00
This commit is contained in:
gorhill 2015-04-27 11:07:51 -04:00
parent 7ad66fdb2c
commit 032d5e0a34
3 changed files with 17 additions and 3 deletions

View File

@ -71,9 +71,11 @@ return {
netWhitelist: {},
netWhitelistModifyTime: 0,
netWhitelistDefault: [
'about-scheme',
'behind-the-scene',
'chrome-extension-scheme',
'chrome-scheme',
'loopconversation.about-scheme',
'opera-scheme'
].join('\n').trim(),

View File

@ -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.3.5') <= 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 });
}

View File

@ -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 + '/';
};
/******************************************************************************/