diff --git a/messaging.js b/messaging.js
index 111991ad..7dfe54b3 100644
--- a/messaging.js
+++ b/messaging.js
@@ -131,3 +131,16 @@ function stringAsRegExp(s, flags) {
function wildcardAsRegExp(s, flags) {
return new RegExp(s.replace(/[{}()\[\]\/\\.+?^$:=!|]/g, "\\$&").replace(/\*/g, '.*?'), flags);
}
+
+var configureCommands = {
+ get url () {
+ return navigator.userAgent.indexOf('OPR') > -1 ?
+ 'opera://settings/configureCommands' :
+ 'chrome://extensions/configureCommands'
+ },
+ open: () => {
+ chrome.tabs.create({
+ 'url': configureCommands.url
+ });
+ }
+};
diff --git a/openOptions.js b/openOptions.js
index 6d4f1f06..24a73fb7 100644
--- a/openOptions.js
+++ b/openOptions.js
@@ -1,3 +1,6 @@
+/* globals configureCommands */
+'use strict';
+
document.querySelector('#manage-options-button').addEventListener("click", function() {
if (chrome.runtime.openOptionsPage) {
// Supported (Chrome 42+)
@@ -8,11 +11,7 @@ document.querySelector('#manage-options-button').addEventListener("click", funct
}
});
-document.querySelector('#manage-shortcuts-button').addEventListener("click", function() {
- chrome.tabs.create({
- 'url': 'chrome://extensions/configureCommands'
- });
-});
+document.querySelector('#manage-shortcuts-button').addEventListener("click", configureCommands.open);
document.querySelector('#editor-styles-button').addEventListener("click", function() {
chrome.tabs.create({
diff --git a/options/index.html b/options/index.html
index a234d6fd..a27a1ddc 100644
--- a/options/index.html
+++ b/options/index.html
@@ -56,6 +56,7 @@
2: , chrome://extensions/configureCommands
+