aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2021-09-10 19:44:47 +0200
committerTeddy Wing2021-09-10 19:44:47 +0200
commitc92c854988e025850b8a3e97b0d84ca4b69ca681 (patch)
tree8f304109529ac1197bf7ddf20d0aa9a1887a07be
parent64cc9ba7781b146da1730ab94d0c27a86315c968 (diff)
parentdd35d8da997dd3fa9f9eb3c749cb13cbc5215131 (diff)
downloadLegibility-c92c854988e025850b8a3e97b0d84ca4b69ca681.tar.bz2
Merge branch 'reload-extension-shortcut'
-rw-r--r--background.js8
-rw-r--r--manifest.json14
2 files changed, 20 insertions, 2 deletions
diff --git a/background.js b/background.js
index bd2be70..558fb55 100644
--- a/background.js
+++ b/background.js
@@ -69,3 +69,11 @@ function wildcard_domains (hostname) {
return domains;
}
+
+
+// Keyboard shortcuts.
+browser.commands.onCommand.addListener(function(command) {
+ if (command === 'reload') {
+ browser.runtime.reload();
+ }
+});
diff --git a/manifest.json b/manifest.json
index cbc5413..3e231d4 100644
--- a/manifest.json
+++ b/manifest.json
@@ -25,9 +25,19 @@
},
"permissions": [
- "activeTab",
"webNavigation",
"http://*/*",
"https://*/*"
- ]
+ ],
+
+ "commands": {
+ "reload": {
+ "suggested_key": {
+ "default": "Ctrl+Alt+L",
+ "mac": "MacCtrl+Alt+L"
+ },
+
+ "description": "Reload the extension"
+ }
+ }
}