mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
Fix version snafu
Related issue: https://github.com/uBlockOrigin/uBlock-issues/issues/3792
This commit is contained in:
parent
52dba4116e
commit
50cb780107
2 changed files with 4 additions and 2 deletions
|
|
@ -48,7 +48,7 @@ vAPI.supportsUserStylesheets = vAPI.webextFlavor.soup.has('user_stylesheet');
|
|||
vAPI.app = {
|
||||
name: manifest.name.replace(/ dev\w+ build/, ''),
|
||||
version: (( ) => {
|
||||
let version = manifest.version;
|
||||
let version = manifest.version_name || manifest.version;
|
||||
const match = /(\d+\.\d+\.\d+)(?:\.(\d+))?/.exec(version);
|
||||
if ( match && match[2] ) {
|
||||
const v = parseInt(match[2], 10);
|
||||
|
|
|
|||
|
|
@ -166,7 +166,9 @@ vAPI.webextFlavor = {
|
|||
soup.add('ipaddress');
|
||||
|
||||
// Whether this is a dev build.
|
||||
if ( /^\d+\.\d+\.\d+\D/.test(browser.runtime.getManifest().version) ) {
|
||||
const manifest = browser.runtime.getManifest();
|
||||
const version = manifest.version_name || manifest.version;
|
||||
if ( /^\d+\.\d+\.\d+\D/.test(version) ) {
|
||||
soup.add('devbuild');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue