aboutsummaryrefslogtreecommitdiffstats
path: root/manifest.json
diff options
context:
space:
mode:
authorTeddy Wing2018-10-05 16:33:01 +0200
committerTeddy Wing2018-10-05 16:33:01 +0200
commit4792514bbcf4aa0c1b102a3afc25c8c0ae4636b5 (patch)
tree9bcbb467d2f119b7d51a408faaaa8495a626bb9b /manifest.json
parentd6af5af47db7690bfbec476f0f2944cd0b204f07 (diff)
downloadLegibility-4792514bbcf4aa0c1b102a3afc25c8c0ae4636b5.tar.bz2
Fix CSS not loading in background tabs
When opening tabs in the background, for example when clicking links, custom CSS wouldn't get properly loaded in those tabs. It turns out that the CSS was actually getting loaded into the current tab, which I hadn't realised. Thanks to Niklas Gollenstede's answer here for clueing me into this: https://discourse.mozilla.org/t/inject-css-with-webextension/16877/3 To fix the problem, we specify the `tabId` in which to load the CSS. We get the `tabId` from the `webNavigation.onCompleted` event, which tells us the page is basically ready.
Diffstat (limited to 'manifest.json')
-rw-r--r--manifest.json1
1 files changed, 1 insertions, 0 deletions
diff --git a/manifest.json b/manifest.json
index 1a3553b..cbc5413 100644
--- a/manifest.json
+++ b/manifest.json
@@ -26,6 +26,7 @@
"permissions": [
"activeTab",
+ "webNavigation",
"http://*/*",
"https://*/*"
]