From 75645602dd70f079ccf550bb5e90dffc21693429 Mon Sep 17 00:00:00 2001 From: Nick White Date: Sat, 23 Oct 2010 23:53:06 +0100 Subject: Update to run in a function, lots of doc additions - Updated readable to run from one function, so returns work nicely now, and things are generally cleaner. - Added a readme - Added a doap rdf file - Added webpage generation to the makefile --- INSTALL | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'INSTALL') diff --git a/INSTALL b/INSTALL index 46fab4e..5f649dc 100644 --- a/INSTALL +++ b/INSTALL @@ -1,24 +1,29 @@ +Readable is written in ECMAScript, and how to launch it varies a +little depending on browser. + # Uzbl -To use this from uzbl, add the following line to the config file (replacing -'s' with the key to bind to): +To use this from uzbl, add the following line to the config file +(replacing 's' with the key to bind to): @cbind s = script file:///path/to/readable.js # Surf -To use it from surf, add the following to script.js: +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): (function() { document.addEventListener('keydown', keybind, false); - })(); +})(); - if(original === undefined) var original = false; - function keybind(e) { - if (!(e.keyIdentifier == "U+0053" && e.ctrlKey)) return 0; // ^s -/* copy readable.js here, removing the line starting 'if(original' */ +function keybind(e) { + if (e.keyIdentifier == "U+0053" && e.ctrlKey) // ^s + readable(); } +/* copy readable.js here, removing the final line 'readable()' */ + # Other browsers; 'bookmarklet' @@ -26,4 +31,7 @@ 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';})(); -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 either run the script from a remote location (eg your webserver), or integrate it into a browser-specific extension. +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 +either run the script from a remote location (eg your webserver), or +integrate it into a browser-specific extension. -- cgit v1.2.3