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
|
||||
stringAsRegExp: false
|
||||
wildcardAsRegExp: false
|
||||
ignoreChromeError: false
|
||||
# localization.js
|
||||
template: false
|
||||
t: false
|
||||
|
|
|
@ -79,7 +79,7 @@ function onBackgroundMessage(request, sender, sendResponse) {
|
|||
case 'prefChanged':
|
||||
// eslint-disable-next-line no-use-before-define
|
||||
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;
|
||||
}
|
||||
|
@ -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.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 = {
|
||||
url: navigator.userAgent.includes('OPR')
|
||||
? 'opera://settings/configureCommands'
|
||||
|
|
Loading…
Reference in New Issue
Block a user