Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Add persistent page modification effect - initial version. Will need more revs as we learn more in spec. #6
+840
−102
Conversation
biancadanforth
added some commits
Dec 5, 2017
biancadanforth
changed the title from
WIP - Add libraries, initial content script works
to
Add persistent page modification effect
Dec 6, 2017
gregglind
reviewed
Dec 6, 2017
I think this is ready, and I am going to land it, and do any more clean up if needful. Holler if I should not do that!
| "manifest_version": 2, | ||
| + "permissions": [ | ||
| + "<all_urls>", |
biancadanforth
Dec 6, 2017
Collaborator
Without this, I get Error: Missing host permission for the tab for both the test-page.html (file:// resource) and a normal webpage (http(s)://). Based on the debugger, the content script loads just fine, but the background script doesn't inject the CSS into the page without it. Looking at MDN these are called "Host Permissions"; though it's not explicitly cited on the list of reasons why you would want to use a host permission.
gregglind
changed the title from
Add persistent page modification effect
to
Add persistent page modification effect - initial version. Will need more revs as we learn more in spec.
Dec 6, 2017
gregglind
merged commit 6649185
into
mozilla:master
Dec 6, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
biancadanforth commentedDec 5, 2017
•
Edited 1 time
-
biancadanforth
Dec 6, 2017
Loads a content script into every tab to search for a list of words in all "p" and "div" elements, if a word is found, it is styled in a unique way (ex: background color, flipped upside down...).
Remaining wiring: connect it to the bootstrapped addon to get and set the word list per session. Currently it resets an arbitrary word list in background.js each time a content script loads.