mirror of https://github.com/gorhill/uBlock.git
Remove remnants of `chrome` references...
... from platform-independent code. This should complete the de-chromiumification of uBO. Next step will be to swap the content of the `platform/chromium` and `platform/firefox` folders so as to reflect that Firefox is the natural platform for uBO.
This commit is contained in:
parent
23c4c80136
commit
350e436c08
|
@ -174,7 +174,7 @@ vAPI.messaging = {
|
|||
this.portPollerBound = this.portPoller.bind(this);
|
||||
}
|
||||
try {
|
||||
this.port = chrome.runtime.connect({name: vAPI.sessionId}) || null;
|
||||
this.port = browser.runtime.connect({name: vAPI.sessionId}) || null;
|
||||
} catch (ex) {
|
||||
this.port = null;
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ vAPI.webextFlavor = {
|
|||
soup.add('ublock').add('webext');
|
||||
|
||||
// Whether this is a dev build.
|
||||
if ( /^\d+\.\d+\.\d+\D/.test(chrome.runtime.getManifest().version) ) {
|
||||
if ( /^\d+\.\d+\.\d+\D/.test(browser.runtime.getManifest().version) ) {
|
||||
soup.add('devbuild');
|
||||
}
|
||||
|
||||
|
@ -127,11 +127,11 @@ vAPI.download = function(details) {
|
|||
|
||||
/******************************************************************************/
|
||||
|
||||
vAPI.getURL = chrome.runtime.getURL;
|
||||
vAPI.getURL = browser.runtime.getURL;
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
vAPI.i18n = chrome.i18n.getMessage;
|
||||
vAPI.i18n = browser.i18n.getMessage;
|
||||
|
||||
// http://www.w3.org/International/questions/qa-scripts#directions
|
||||
document.body.setAttribute(
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
// indexedDB.
|
||||
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1371255
|
||||
// Firefox-specific: we use indexedDB because chrome.storage.local() has
|
||||
// Firefox-specific: we use indexedDB because browser.storage.local() has
|
||||
// poor performance in Firefox.
|
||||
// https://github.com/uBlockOrigin/uBlock-issues/issues/328
|
||||
// Use IndexedDB for Chromium as well, to take advantage of LZ4
|
||||
|
|
|
@ -109,7 +109,7 @@ const onMessage = function(request, sender, callback) {
|
|||
|
||||
case 'getAppData':
|
||||
response = {
|
||||
name: chrome.runtime.getManifest().name,
|
||||
name: browser.runtime.getManifest().name,
|
||||
version: vAPI.app.version
|
||||
};
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue