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
21
messaging.js
21
messaging.js
|
@ -193,18 +193,9 @@ function wildcardAsRegExp(s, flags) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// isolate deoptimization trigger:
|
const configureCommands = {
|
||||||
// https://github.com/petkaantonov/bluebird/wiki/Optimization-killers
|
url: navigator.userAgent.includes('OPR')
|
||||||
// * Functions that contain object literals that contain __proto__, or get or set declarations.
|
? 'opera://settings/configureCommands'
|
||||||
const configureCommands = (() => ({
|
: 'chrome://extensions/configureCommands',
|
||||||
get url() {
|
open: () => openURL({url: configureCommands.url}),
|
||||||
return navigator.userAgent.includes('OPR')
|
};
|
||||||
? 'opera://settings/configureCommands'
|
|
||||||
: 'chrome://extensions/configureCommands';
|
|
||||||
},
|
|
||||||
open: () => {
|
|
||||||
chrome.tabs.create({
|
|
||||||
'url': configureCommands.url
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}))();
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user