summaryrefslogtreecommitdiff
path: root/chromium/background.html
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/background.html')
-rw-r--r--chromium/background.html12
1 files changed, 10 insertions, 2 deletions
diff --git a/chromium/background.html b/chromium/background.html
index 5343f46..7850bd2 100644
--- a/chromium/background.html
+++ b/chromium/background.html
@@ -1,5 +1,13 @@
<html><head><script>
- chrome.browserAction.onClicked.addListener(function(tab) {
- chrome.tabs.executeScript(null, {code:"simplyread();"});
+ function onRequest(request, sender, sendResponse) {
+ chrome.pageAction.show(sender.tab.id);
+ sendResponse({});
+ };
+
+ /* called on page load if viable */
+ chrome.extension.onRequest.addListener(onRequest);
+
+ chrome.pageAction.onClicked.addListener(function(tab) {
+ chrome.tabs.executeScript(tab.id, {code:"simplyread();"});
});
</script></head></html>