diff options
author | Nick White <git@njw.me.uk> | 2011-05-21 12:54:14 +0100 |
---|---|---|
committer | Nick White <git@njw.me.uk> | 2011-05-21 12:54:14 +0100 |
commit | bf340e9f5ed22058877af1878c85c16de1dd8904 (patch) | |
tree | fb1f1cd1ba6d4331645df8ce455b67e91e3ca3ae /chromium/viable.js | |
parent | 4cdb10438dad3fd4b9ecc8ef96538f4219b42e5e (diff) |
Make chromium extension a page action
Diffstat (limited to 'chromium/viable.js')
-rwxr-xr-x | chromium/viable.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/chromium/viable.js b/chromium/viable.js new file mode 100755 index 0000000..09acb36 --- /dev/null +++ b/chromium/viable.js @@ -0,0 +1,13 @@ +/* + * SimplyRead - makes webpages more readable + * + * See COPYING file for copyright, license and warranty details. + */ + +function viable() { + var doc; + doc = (document.body === undefined) + ? window.content.document : document; + return doc.getElementsByTagName("p").length; +} +if(viable()) chrome.extension.sendRequest({}, function(response) {}); |