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:
Raymond Hill 2019-09-21 12:06:57 -04:00
parent 23c4c80136
commit 350e436c08
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
4 changed files with 6 additions and 6 deletions

View File

@ -174,7 +174,7 @@ vAPI.messaging = {
this.portPollerBound = this.portPoller.bind(this); this.portPollerBound = this.portPoller.bind(this);
} }
try { try {
this.port = chrome.runtime.connect({name: vAPI.sessionId}) || null; this.port = browser.runtime.connect({name: vAPI.sessionId}) || null;
} catch (ex) { } catch (ex) {
this.port = null; this.port = null;
} }

View File

@ -52,7 +52,7 @@ vAPI.webextFlavor = {
soup.add('ublock').add('webext'); soup.add('ublock').add('webext');
// Whether this is a dev build. // 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'); 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 // http://www.w3.org/International/questions/qa-scripts#directions
document.body.setAttribute( document.body.setAttribute(

View File

@ -39,7 +39,7 @@
// indexedDB. // indexedDB.
// https://bugzilla.mozilla.org/show_bug.cgi?id=1371255 // 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. // poor performance in Firefox.
// https://github.com/uBlockOrigin/uBlock-issues/issues/328 // https://github.com/uBlockOrigin/uBlock-issues/issues/328
// Use IndexedDB for Chromium as well, to take advantage of LZ4 // Use IndexedDB for Chromium as well, to take advantage of LZ4

View File

@ -109,7 +109,7 @@ const onMessage = function(request, sender, callback) {
case 'getAppData': case 'getAppData':
response = { response = {
name: chrome.runtime.getManifest().name, name: browser.runtime.getManifest().name,
version: vAPI.app.version version: vAPI.app.version
}; };
break; break;