Simplify configureCommands; focus an existing tab
Instead of isolating the deoptimization trigger: https://github.com/petkaantonov/bluebird/wiki/Optimization-killers
This commit is contained in:
parent
55ac677d85
commit
54ab65989d
19
messaging.js
19
messaging.js
|
@ -193,18 +193,9 @@ function wildcardAsRegExp(s, flags) {
|
|||
}
|
||||
|
||||
|
||||
// isolate deoptimization trigger:
|
||||
// https://github.com/petkaantonov/bluebird/wiki/Optimization-killers
|
||||
// * Functions that contain object literals that contain __proto__, or get or set declarations.
|
||||
const configureCommands = (() => ({
|
||||
get url() {
|
||||
return navigator.userAgent.includes('OPR')
|
||||
const configureCommands = {
|
||||
url: navigator.userAgent.includes('OPR')
|
||||
? 'opera://settings/configureCommands'
|
||||
: 'chrome://extensions/configureCommands';
|
||||
},
|
||||
open: () => {
|
||||
chrome.tabs.create({
|
||||
'url': configureCommands.url
|
||||
});
|
||||
}
|
||||
}))();
|
||||
: 'chrome://extensions/configureCommands',
|
||||
open: () => openURL({url: configureCommands.url}),
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user