blob: 46fab4efa38cdbc3b9801e4e626ab5f0851ed747 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# Uzbl
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:
(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' */
}
# 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';})();
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.
|