Skip to content

Commit

Permalink
resolve mozilla addon warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
adeliktas committed Dec 28, 2021
1 parent 5023127 commit e8d9d66
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions js/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ document.addEventListener('DOMContentLoaded', function () {
$("#pop_ay").mouseup(function(e) { if (e.which != 3) openTab('https://twitter.com/adeliktasde'); });
$("#pop_docs").mouseup(function(e) { if (e.which != 3) openTab('https://www.andryou.com/scriptsafe/'); });
$("#pop_project").mouseup(function(e) { if (e.which != 3) openTab('https://github.com/adeliktas/scriptsafe-firefox'); });
$("#pop_options").mouseup(function(e) { if (e.which != 3) openTab(chrome.extension.getURL('html/options.html')); });
$("#pop_log").mouseup(function(e) { if (e.which != 3) openTab(chrome.extension.getURL('html/recents.html')); });
$("#pop_options").mouseup(function(e) { if (e.which != 3) openTab(chrome.runtime.getURL('html/options.html')); });
$("#pop_log").mouseup(function(e) { if (e.which != 3) openTab(chrome.runtime.getURL('html/recents.html')); });
$("#pop_webstore").mouseup(function(e) { if (e.which != 3) openTab('https://addons.mozilla.org/firefox/addon/scriptsafe-ff/'); });
$("#pop_refresh").mouseup(function(e) { if (e.which != 3) chrome.tabs.reload({bypassCache: true}); window.close(); });
if (!bkg) {
Expand Down
10 changes: 5 additions & 5 deletions js/scriptsafe.js
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ function genContextMenu() {
chrome.contextMenus.create({"title": getLocale("revoketemp"), "parentId": parent, "onclick": removeTempPage});
chrome.contextMenus.create({"title": getLocale("revoketempall"), "parentId": parent, "onclick": removeTempAll});
chrome.contextMenus.create({"parentId": parent, "type": "separator"});
chrome.contextMenus.create({"title": getLocale("options"), "parentId": parent, "onclick": function() { chrome.tabs.create({ url: chrome.extension.getURL('html/options.html')}); }});
chrome.contextMenus.create({"title": getLocale("options"), "parentId": parent, "onclick": function() { chrome.tabs.create({ url: chrome.runtime.getURL('html/options.html')}); }});
if (localStorage["enable"] == "false") chrome.contextMenus.create({"title": getLocale("enabless"), "parentId": parent, "onclick": function() { saveSetting('enable', "true"); contextHandle('toggle'); }});
else chrome.contextMenus.create({"title": getLocale("disable"), "parentId": parent, "onclick": function() { saveSetting('enable', "false"); contextHandle('toggle'); }});
}
Expand Down Expand Up @@ -1231,8 +1231,8 @@ function freshSync(force) {
clearStorage.then(function() {
var syncStatus = browser.storage.sync.set(settingssync);
syncStatus.then(function() {
if (chrome.extension.lastError){
alert(chrome.extension.lastError.message);
if (chrome.runtime.lastError){
alert(chrome.runtime.lastError.message);
} else {
if (localStorage['syncnotify'] == 'true') chrome.notifications.create('syncnotify', {'type': 'basic', 'iconUrl': '../img/icon48.png', 'title': 'ScriptSafe - '+getLocale("exportsuccesstitle"), 'message': getLocale("exportsuccess")}, function(callback) { return true; } );
}
Expand Down Expand Up @@ -1438,7 +1438,7 @@ function cacheFpLists() {
}
}
function initLang(lang, mode) {
var url = chrome.extension.getURL('_locales/' + lang + '/messages.json');
var url = chrome.runtime.getURL('_locales/' + lang + '/messages.json');
$.ajax({
url: url,
dataType: 'json',
Expand Down Expand Up @@ -1482,7 +1482,7 @@ storageData.then(function(data) {
function postLangLoad() {
if (!optionExists("version") || localStorage["version"] != version) {
if (localStorage["updatenotify"] == "true") {
chrome.tabs.create({ url: chrome.extension.getURL('html/updated.html')});
chrome.tabs.create({ url: chrome.runtime.getURL('html/updated.html')});
}
saveSetting('version', version);
}
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
},
"applications": {
"gecko": {
"id": "adeliktas@web.de",
"id": "scriptsafe@github.test",
"strict_min_version": "57.0"
}
},
Expand Down

0 comments on commit e8d9d66

Please sign in to comment.