fix typos
[uweb.git] / ebrowser.md
blob87344a42e632d0b0715b123d46b005bbedf81567
1 ### [Ebrowser](https://github.com/torappinfo/ebrowser): keyboard-friendly minimal suckless web browser
2 Ebrowser is designed with the philosophy of [Android uweb browser](https://github.com/torappinfo/uweb) ([gitlab](https://gitlab.com/jamesfengcao/uweb)).
4 - lightweight (less than 20k bytes) without bundled electron.
5 - much less memory footprint than edge/chrome browser and highly performant.
6 - keyboard friendly with vim-style keymaps and command line support in address bar.
7 - [global redirection](https://uweb.surge.sh/en/redirect/index.html#) to bypass censorship.
8 - user scripts at will. Ex. pressing "tr" to translate the page (need mapkeys.json config).
9 - customizable.
11 Note: Usually electron apps are heavyweight as they use browsers for simple things. Ebrowser uses core chromium effectively and very lightweight. Recommend to install electron separately.
13 #### Installing (for Windows, MacOS and Linux)
14 ##### Install with prebuilt binaries
15 You can find prebuilt binaries [here](https://github.com/torappinfo/ebrowser/releases).
17 ##### Install with nodejs installed
19     npm install electron
20     npm install ebrowser
22 Run ebrowser
24     electron ~/node_modules/ebrowser
26 Later on, you can run "npm install electron" to update electron/chromium or "npm install ebrowser" to update ebrowser independently.
28 #### Key shortcuts
29 - F1: Help
30 - CTRL+C: stop loading
31 - CTRL+G: address bar to show page url
32 - CTRL+L: focus to address bar
33 - CTRL+T: new Tab
34 - CTRL+SHIFT+T: restore closed Tab
35 - CTRL+TAB: switch to next tab
36 - CTRL+SHIFT+TAB: switch to previous tab
37 - CTRL+W: close Tab
38 - CTRL+<-: go backward
39 - CTRL+->: go forward
40 - CTRL+SHIFT+R: enable global redirection ("gredirect.json")
41 - CTRL+R: disable global redirection
42 - ESC: remove focus. similar to vi normal mode.
43 - F5: page refresh/reload
44 - F12: devtools
46 #### Address bar commands
47 - "/" for find-in-page
48 - ":" for address bar commands
49   - ac [bookmark/history path w/o ext] : load ".rec" file for autocomplete.
50   - b [bookmarkfilename w/o ext] : bookmark current page in file.
51   - bml [filename w/o extension]: load/execute the javascript file.
52   - cert : allow invalid certificates w/o arguments, otherwise restore to default.
53   - clear : the arguments could be
54     - cache : clear cache
55     - dns : clear dns cache
56     - storage: clear site storage data.
57     - {[options](https://www.electronjs.org/docs/latest/api/session#sescleardataoptions)}
58   - ext [extension path]: load unpacked Chrome extension.
59   - nc/uc : No Cookie forwarding/Use Cookie forwarding with global redirection.
60   - nh/uh for No/Use url history.
61   - nj/uj for No/Use external Javascript files.
62   - nr/ur for No/Use "redirect.json" for domain redirection.
63   - np : no proxy.
64   - up [proxyName] : use proxy. privous proxy or the first proxy in proxy.json w/o [proxyName]. ":up" command also disables global and domain redirections, which are not restored by ":np".
65   - ua [useragentName] : set user agent for future tabs. default user agent w/o arguments.
66   - pdf [filename w/o extension] {[options](https://www.electronjs.org/docs/latest/api/web-contents#contentsprinttopdfoptions)} : print to PDF file. All arguments are optional; empty option "{}" to capture long screenshot as vector graphics.
67 - "!" address bar commands
68   "!xx ..." evaluates "xx.js" with the whole address bar text as arguments[0].
69   
70 #### Commands in no-focus mode (this mode is similar to vi Normal mode)
71 Pressing "ESC" to enter no-focus mode if not sure.
72 - ":" for address bar commands
73 - "/" for find-in-page with address bar
74 - "!" for ":!" address bar commands
76 The other commands are defined in "mapkeys.json", which will map keys to address bar commands.
78 #### Configuration files
79 - "config": lines of address bar commands.
80 - "search.json": search engines as shortcut-queryUrl pairs.
81 - "default.autoc": predefined strings for address bar auto completion.
82 - "gredirect.json": global redirection urls as array of urls
83 - "redirect.json": domain-replacementDomain pairs, default to be applied.
84 - "mapkeys.json": keys-addressbarCommands pairs. The addressbar commands are multiple lines of address bar command separated by "\n".
85 - "proxy.json": name-[ProxyConfig](https://www.electronjs.org/docs/latest/api/structures/proxy-config) pairs
86 - "uas.json" : name-useragent pairs
88 #### New usages
89 - Vector designing with web tech to replace Adobe Illustrator/Inkscape.
90   - Design with web tech.
91   
92   - Printing to pdf with customized paper size.
93   - Magnify the pdf paper size to the required size.
95   OR
96   
97   - Adjust window width and use addressbar command line ":Pdf {}" to export vector graphics.
98   - Use imageMagick to convert to any other vector graphics format.
100 #### License
101 You can copy or modify the code/program under the terms of the GPL3.0 or later versions.