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

code review: allow dev build of Firefox to update resources.txt

This commit is contained in:
Raymond Hill 2018-03-11 10:38:35 -04:00
parent 081e5b4db9
commit dd979ff5ff
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -906,13 +906,20 @@ var updaterStatus,
noRemoteResources;
var updateFirst = function() {
// Firefox extension reviewers do not want uBO/webext to fetch its own
// scriptlets/resources asset from the project's own repo (github.com).
// See: https://github.com/gorhill/uBlock/commit/126110c9a0a0630cd556f5cb215422296a961029
// https://github.com/gorhill/uBlock/commit/126110c9a0a0630cd556f5cb215422296a961029
// Firefox extension reviewers do not want uBO/webext to fetch its own
// scriptlets/resources asset from the project's own repo (github.com).
// https://github.com/uBlockOrigin/uAssets/issues/1647#issuecomment-371456830
// Allow self-hosted dev build to update: if update_url is present but
// null, assume the extension is hosted on AMO.
if ( noRemoteResources === undefined ) {
var manifest = chrome.runtime.getManifest();
noRemoteResources =
typeof vAPI.webextFlavor === 'string' &&
vAPI.webextFlavor.startsWith('Mozilla-Firefox-');
vAPI.webextFlavor.startsWith('Mozilla-Firefox-') &&
manifest.applications instanceof Object &&
manifest.applications.gecko instanceof Object &&
manifest.applications.gecko.update_url === null;
}
updaterStatus = 'updating';
updaterFetched.clear();