mirror of
https://codeberg.org/nobody/LocalCDN.git
synced 2025-01-20 13:48:19 +01:00
Code improved
This commit is contained in:
parent
91add79d61
commit
1f53cfc52c
13
core/main.js
13
core/main.js
@ -69,11 +69,6 @@ main._initializeSettings = function () {
|
|||||||
|
|
||||||
main._showReleaseNotes = function (details) {
|
main._showReleaseNotes = function (details) {
|
||||||
|
|
||||||
let location, updateAdBlockerRules, previousVersion;
|
|
||||||
|
|
||||||
location = chrome.extension.getURL('pages/welcome/welcome.html');
|
|
||||||
updateAdBlockerRules = chrome.extension.getURL('pages/updates/updates.html');
|
|
||||||
|
|
||||||
if (details.reason === chrome.runtime.OnInstalledReason.INSTALL) {
|
if (details.reason === chrome.runtime.OnInstalledReason.INSTALL) {
|
||||||
|
|
||||||
chrome.storage.sync.set({
|
chrome.storage.sync.set({
|
||||||
@ -82,10 +77,6 @@ main._showReleaseNotes = function (details) {
|
|||||||
|
|
||||||
previousVersion = details.previousVersion;
|
previousVersion = details.previousVersion;
|
||||||
|
|
||||||
if (previousVersion && previousVersion.charAt(0) === '2') {
|
|
||||||
return; // Do not show release notes after minor updates.
|
|
||||||
}
|
|
||||||
|
|
||||||
if (details.temporary !== true) {
|
if (details.temporary !== true) {
|
||||||
|
|
||||||
chrome.storage.sync.get([Setting.HIDE_RELEASE_NOTES], function (items) {
|
chrome.storage.sync.get([Setting.HIDE_RELEASE_NOTES], function (items) {
|
||||||
@ -93,7 +84,7 @@ main._showReleaseNotes = function (details) {
|
|||||||
if (items.hideReleaseNotes !== true) {
|
if (items.hideReleaseNotes !== true) {
|
||||||
|
|
||||||
chrome.tabs.create({
|
chrome.tabs.create({
|
||||||
'url': location,
|
'url': chrome.extension.getURL('pages/welcome/welcome.html'),
|
||||||
'active': false
|
'active': false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -117,7 +108,7 @@ main._showReleaseNotes = function (details) {
|
|||||||
}, function() {
|
}, function() {
|
||||||
if (!items.hideReleaseNotes) {
|
if (!items.hideReleaseNotes) {
|
||||||
chrome.tabs.create({
|
chrome.tabs.create({
|
||||||
'url': updateAdBlockerRules,
|
'url': chrome.extension.getURL('pages/updates/updates.html'),
|
||||||
'active': false
|
'active': false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -383,7 +383,6 @@ var mappings = {
|
|||||||
'dojo/{version}/dojo.': resources.dojo,
|
'dojo/{version}/dojo.': resources.dojo,
|
||||||
'emberjs/{version}/ember.': resources.ember,
|
'emberjs/{version}/ember.': resources.ember,
|
||||||
'jquery/{version}/jquery.': resources.jQuery,
|
'jquery/{version}/jquery.': resources.jQuery,
|
||||||
'npm/jquery@{version}/dist/jquery.': resources.jQuery,
|
|
||||||
'jquery.ui/{version}/jquery-ui.js': resources.jQueryUI,
|
'jquery.ui/{version}/jquery-ui.js': resources.jQueryUI,
|
||||||
'jquery.ui/{version}/jquery-ui.min.js': resources.jQueryUI,
|
'jquery.ui/{version}/jquery-ui.min.js': resources.jQueryUI,
|
||||||
'jquery.slick/{version}/slick.css': resources.slickCarouselCSS,
|
'jquery.slick/{version}/slick.css': resources.slickCarouselCSS,
|
||||||
|
Loading…
Reference in New Issue
Block a user