summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.me.uk>2010-11-02 18:25:20 +0000
committerNick White <git@njw.me.uk>2010-11-02 18:25:20 +0000
commit2cee16336a4ce756cac166adccbb40a41122b6f4 (patch)
tree7610fde44a7a96c4dda4e11e47fb141d43349039
parent6600661f33c02dcea1944a4dabaa1eae77b1ca33 (diff)
Switch to not running readable by default on load
-rw-r--r--INSTALL12
-rwxr-xr-xreadable.js1
2 files changed, 8 insertions, 5 deletions
diff --git a/INSTALL b/INSTALL
index 5f649dc..8b85241 100644
--- a/INSTALL
+++ b/INSTALL
@@ -8,11 +8,15 @@ To use this from uzbl, add the following line to the config file
@cbind s = script file:///path/to/readable.js
+You'll also have to add the statement 'readable();' to the bottom of
+readable.js.
+
# Surf
-To use it from surf, add the following to script.js (replacing the
-keyIdentifier if you want to bind to a key other than Ctrl-S):
+To use it from surf, and trigger it from a key combination, add the
+following to script.js (replacing the keyIdentifier if you want to
+bind to a key other than Ctrl-S):
(function() {
document.addEventListener('keydown', keybind, false);
@@ -22,14 +26,14 @@ function keybind(e) {
if (e.keyIdentifier == "U+0053" && e.ctrlKey) // ^s
readable();
}
-/* copy readable.js here, removing the final line 'readable()' */
+/* copy readable.js here */
# Other browsers; 'bookmarklet'
To use this as a 'bookmarklet', create a new bookmark with an address of:
-javascript:(function(){document.body.appendChild(document.createElement('script')).src='file:///path/to/readable.js';})();
+javascript:(function(){document.body.appendChild(document.createElement('script')).src='file:///path/to/readable.js';readable()})();
Note that due to browsers being afraid of mixing local and remote files
this may not work for http:// addresses. If this is the case, you can
diff --git a/readable.js b/readable.js
index c0883f5..27a6767 100755
--- a/readable.js
+++ b/readable.js
@@ -67,4 +67,3 @@ function readable()
return 0;
}
-readable()