ignoreChromeError -> messaging; use it in editor's menu update
This commit is contained in:
parent
e384657668
commit
668e3a7b56
|
@ -23,6 +23,7 @@ globals:
|
||||||
activateTab: false
|
activateTab: false
|
||||||
stringAsRegExp: false
|
stringAsRegExp: false
|
||||||
wildcardAsRegExp: false
|
wildcardAsRegExp: false
|
||||||
|
ignoreChromeError: false
|
||||||
# localization.js
|
# localization.js
|
||||||
template: false
|
template: false
|
||||||
t: false
|
t: false
|
||||||
|
|
|
@ -79,7 +79,7 @@ function onBackgroundMessage(request, sender, sendResponse) {
|
||||||
case 'prefChanged':
|
case 'prefChanged':
|
||||||
// eslint-disable-next-line no-use-before-define
|
// eslint-disable-next-line no-use-before-define
|
||||||
if (typeof request.value == 'boolean' && contextMenus[request.prefName]) {
|
if (typeof request.value == 'boolean' && contextMenus[request.prefName]) {
|
||||||
chrome.contextMenus.update(request.prefName, {checked: request.value});
|
chrome.contextMenus.update(request.prefName, {checked: request.value}, ignoreChromeError);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -228,8 +228,3 @@ function injectContentScripts() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function ignoreChromeError() {
|
|
||||||
chrome.runtime.lastError; // eslint-disable-line no-unused-expressions
|
|
||||||
}
|
|
||||||
|
|
2
edit.js
2
edit.js
|
@ -1214,7 +1214,7 @@ function toggleContextMenuDelete(event) {
|
||||||
this.selectionStart != this.selectionEnd ||
|
this.selectionStart != this.selectionEnd ||
|
||||||
this.somethingSelected && this.somethingSelected()
|
this.somethingSelected && this.somethingSelected()
|
||||||
),
|
),
|
||||||
});
|
}, ignoreChromeError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -191,6 +191,11 @@ function wildcardAsRegExp(s, flags) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function ignoreChromeError() {
|
||||||
|
chrome.runtime.lastError; // eslint-disable-line no-unused-expressions
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const configureCommands = {
|
const configureCommands = {
|
||||||
url: navigator.userAgent.includes('OPR')
|
url: navigator.userAgent.includes('OPR')
|
||||||
? 'opera://settings/configureCommands'
|
? 'opera://settings/configureCommands'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user