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:
tophf 2017-03-26 12:02:06 +03:00
parent 55ac677d85
commit 54ab65989d

View File

@ -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}),
};