diff options
author | Nick White <git@njw.me.uk> | 2011-12-11 13:49:02 +0000 |
---|---|---|
committer | Nick White <git@njw.me.uk> | 2011-12-11 13:49:02 +0000 |
commit | d878db527ce092b97dcb8f8d29d2e9456f50fdb5 (patch) | |
tree | 8c7817e47546a089afdfc6cc8c9a8076f93b9c5e /chromium/background.html | |
parent | 0a02e740fb0ce5cabd0ea5b6f3f6f72c30a66cf7 (diff) |
Add options to chromium extension
Diffstat (limited to 'chromium/background.html')
-rw-r--r-- | chromium/background.html | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chromium/background.html b/chromium/background.html index ce0042e..6d0847c 100644 --- a/chromium/background.html +++ b/chromium/background.html @@ -7,6 +7,9 @@ chrome.extension.onRequest.addListener(onRequest); chrome.pageAction.onClicked.addListener(function(tab) { - chrome.tabs.executeScript(tab.id, {code:"simplyread();"}); + if (!localStorage.prefs) + localStorage.prefs = '{"nostyle":false,"nolinks":false}'; + var prefs = JSON.parse(localStorage.prefs); + chrome.tabs.executeScript(tab.id, {code:"simplyread("+prefs.nostyle+","+prefs.nolinks+");"}); }); </script></head></html> |