Upgrade to the latest version.
This commit is contained in:
@@ -2,7 +2,7 @@ var ext_api = (typeof browser === 'object') ? browser : chrome;
|
||||
|
||||
var manifestData = ext_api.runtime.getManifest();
|
||||
var url_loc = manifestData.key ? 'chrome' : 'firefox';
|
||||
var ext_url = 'https://github.com/bpc-clone/bpc_updates/releases/latest';
|
||||
var ext_url = 'https://gitflic.ru/project/magnolia1234/bpc_uploads';
|
||||
var ext_name = manifestData.name;
|
||||
var version_str = 'v' + manifestData.version;
|
||||
var version_span = document.querySelector('span#version');
|
||||
@@ -28,6 +28,7 @@ function show_warning() {
|
||||
version_span_new.appendChild(par);
|
||||
}
|
||||
}
|
||||
|
||||
function show_update(ext_version_new, check = true) {
|
||||
if (ext_version_new) {
|
||||
ext_api.management.getSelf(function (result) {
|
||||
@@ -42,7 +43,7 @@ function show_update(ext_version_new, check = true) {
|
||||
if (installType === 'development')
|
||||
anchorEl.href = ext_url;
|
||||
else {
|
||||
anchorEl.href = ext_url + '/-/releases';
|
||||
anchorEl.href = ext_url;
|
||||
ext_version_new = ext_version_new.replace(/\d$/, '0');
|
||||
}
|
||||
anchorEl.innerText = 'New release v' + ext_version_new;
|
||||
@@ -52,8 +53,8 @@ function show_update(ext_version_new, check = true) {
|
||||
show_warning();
|
||||
} else if (check) {
|
||||
anchorEl = document.createElement('a');
|
||||
anchorEl.text = 'Check Twitter for latest update';
|
||||
anchorEl.href = 'https://twitter.com/Magnolia1234B';
|
||||
anchorEl.text = 'Check X/Twitter for latest update';
|
||||
anchorEl.href = 'https://x.com/Magnolia1234B';
|
||||
anchorEl.target = '_blank';
|
||||
version_span_new.appendChild(anchorEl);
|
||||
}
|
||||
@@ -61,20 +62,10 @@ function show_update(ext_version_new, check = true) {
|
||||
|
||||
function check_version_update(ext_version_new, popup) {
|
||||
if (!popup) {
|
||||
let manifest_new = 'https://bitbucket.org/bpc-updates/bpc_updates/downloads/manifest.json';
|
||||
fetch(manifest_new)
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
response.json().then(json => {
|
||||
var version_new = json['version'];
|
||||
show_update(version_new);
|
||||
})
|
||||
} else {
|
||||
show_update(ext_version_new);
|
||||
}
|
||||
}).catch(function (err) {
|
||||
false;
|
||||
ext_api.runtime.sendMessage({
|
||||
request: 'check_update'
|
||||
});
|
||||
show_update(ext_version_new);
|
||||
} else
|
||||
show_update(ext_version_new, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user