5 <meta name=
"viewport" content=
"width=device-width, initial-scale=1" />
7 <link rel=
"stylesheet" href=
"../style.css#" type=
"text/css" />
9 <script type=
"text/javascript">
11 let href
= location
.href
;
12 for(let i
=href
.length
-1;i
>0;i
--){
13 if('/'==href
.charAt(i
) && '/'==href
.charAt(i
-3))
20 location
.href
= location
.href
.substring(0,i
+1)+page
;
22 function nav2Lang(lang
){
24 let href
= location
.href
;
25 location
.href
= location
.href
.substring(0,i
-2)+lang
+location
.href
.substring(i
);
30 <header class='header'
>
31 <a class=
"logo" href=
"javascript:void(0)" onclick=
"return nav2('index.html#')">Home
</a> <a class=
"logo" href=
"javascript:void(0)" onclick=
"return nav2('tags/index.html#')">Tags
</a>
38 <div class=
"container">
41 <span class=
"subtitle"></span>
46 <h3 id=
"ebrowserhttpsgithubcomtorappinfoebrowser-keyboard-friendly-minimal-suckless-web-browser"><a href=
"https://github.com/torappinfo/ebrowser">Ebrowser
</a>: keyboard-friendly minimal suckless web browser
</h3>
47 <p>Ebrowser is designed with the philosophy of
<a href=
"https://github.com/torappinfo/uweb">Android uweb browser
</a> (
<a href=
"https://gitlab.com/jamesfengcao/uweb">gitlab
</a>).
</p>
49 <li>lightweight (less than
20k bytes) without bundled electron.
</li>
50 <li>much less memory footprint than edge/chrome browser and highly performant.
</li>
51 <li>keyboard friendly with vim-style keymaps and command line support in address bar.
</li>
52 <li>global redirection to bypass censorship.
</li>
53 <li>user scripts at will. Ex. pressing
"tr
" to translate the page (need mapkeys.json config).
</li>
54 <li>customizable.
</li>
56 <p>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.
</p>
57 <h4 id=
"install-for-windows-macos-and-linux">Install (for Windows, MacOS and Linux)
</h4>
58 <p>Install ebrowser with nodejs installed
</p>
59 <pre><code>npm install ebrowser
62 <pre><code>electron ~/node_modules/ebrowser
64 <h4 id=
"key-shortcuts">Key shortcuts
</h4>
66 <li>CTRL+C: stop loading
</li>
67 <li>CTRL+G: address bar to show page url
</li>
68 <li>CTRL+L: focus to address bar
</li>
69 <li>CTRL+T: new Tab
</li>
70 <li>CTRL+SHIFT+T: restore closed Tab
</li>
71 <li>CTRL+TAB: switch to next tab
</li>
72 <li>CTRL+SHIFT+TAB: switch to previous tab
</li>
73 <li>CTRL+W: close Tab
</li>
74 <li>CTRL+
<-: go backward
</li>
75 <li>CTRL+-
>: go forward
</li>
76 <li>CTRL+SHIFT+R: enable global redirection (
"gredirect.json
")
</li>
77 <li>CTRL+R: disable global redirection
</li>
78 <li>ESC: remove focus. similar to vi normal mode.
</li>
79 <li>F5: page refresh/reload
</li>
80 <li>F12: devtools
</li>
82 <h4 id=
"address-bar-commands">Address bar commands
</h4>
84 <li>"/
" for find-in-page
</li>
85 <li>":
" for address bar commands
87 <li>ac [bookmark/history path w/o ext] : load
".rec
" file for autocomplete.
</li>
88 <li>b [bookmarkfilename w/o ext] : bookmark current page in file.
</li>
89 <li>bml [filename w/o extension]: load/execute the javascript file.
</li>
90 <li>cert : allow invalid certificates w/o arguments, otherwise restore to default.
</li>
91 <li>clear : the arguments could be
93 <li>cache : clear cache
</li>
94 <li>dns : clear dns cache
</li>
95 <li>storage: clear site storage data.
</li>
96 <li>{
<a href=
"https://www.electronjs.org/docs/latest/api/session#sescleardataoptions">options
</a>}
</li>
99 <li>ext [extension path]: load unpacked Chrome extension.
</li>
100 <li>nc/uc : No Cookie forwarding/Use Cookie forwarding with global redirection.
</li>
101 <li>nh/uh for No/Use url history.
</li>
102 <li>nj/uj for No/Use external Javascript files.
</li>
103 <li>nr/ur for No/Use
"redirect.json
" for domain redirection.
</li>
104 <li>np : no proxy
</li>
105 <li>up [proxyName] : use proxy. privous proxy or the first proxy in proxy.json w/o [proxyName].
</li>
106 <li>ua [useragentName] : set user agent for future tabs. default user agent w/o arguments.
</li>
107 <li>pdf [filename w/o extension] {
<a href=
"https://www.electronjs.org/docs/latest/api/web-contents#contentsprinttopdfoptions">options
</a>} : print to PDF file. All arguments are optional; empty option
"{}
" to capture long screenshot as vector graphics.
</li>
110 <li>":!
" address bar commands
</li>
112 <h4 id=
"commands-in-no-focus-mode-this-mode-is-similar-to-vi-normal-mode">Commands in no-focus mode (this mode is similar to vi Normal mode)
</h4>
113 <p>Pressing
"ESC
" to enter no-focus mode if not sure.
</p>
115 <li>":
" for address bar commands
</li>
116 <li>"/
" for find-in-page with address bar
</li>
117 <li>"!
" for
":!
" address bar commands
</li>
119 <p>The other commands are defined in
"mapkeys.json
", which will map keys to address bar commands.
</p>
120 <h4 id=
"configuration-files">Configuration files
</h4>
122 <li>"config
": lines of address bar commands.
</li>
123 <li>"search.json
": search engines as shortcut-queryUrl pairs.
</li>
124 <li>"default.autoc
": predefined strings for address bar auto completion.
</li>
125 <li>"gredirect.json
": global redirection urls as array of urls
</li>
126 <li>"redirect.json
": domain-replacementDomain pairs, default to be applied.
</li>
127 <li>"mapkeys.json
": keys-addressbarCommands pairs. The addressbar commands are multiple lines of address bar command separated by
"\n
".
</li>
128 <li>"proxy.json
": name-
<a href=
"https://www.electronjs.org/docs/latest/api/structures/proxy-config">ProxyConfig
</a> pairs
</li>
129 <li>"uas.json
" : name-useragent pairs
</li>
131 <h4 id=
"new-usages">New usages
</h4>
134 <p>Vector designing with web tech to replace Adobe Illustrator/Inkscape.
</p>
137 <p>Design with web tech.
</p>
140 <p>Printing to pdf with customized paper size.
</p>
143 <p>Magnify the pdf paper size to the required size.
</p>
148 <li>Adjust window width and use addressbar command line
":Pdf {}
" to export vector graphics.
</li>
149 <li>Use imageMagick to convert to any other vector graphics format.
</li>
155 <p>Last Modified:
15 June
2024<br>
160 <script id='jsgiscus'
161 src='https://giscus.app/client.js'
162 data-repo=
"torappinfo/uweb"
163 data-repo-id=
"MDEwOlJlcG9zaXRvcnkzMDIyMDU3MjE="
164 data-category=
"Announcements"
165 data-category-id=
"DIC_kwDOEgNLGc4CQjsh"
168 data-reactions-enabled=
"1"
169 data-emit-metadata=
"0"
170 data-input-position=
"top"
174 crossorigin=
"anonymous" async
>
177 <footer class=
"site-footer">
178 <div class=
"container">
179 © 2018-
2024 Richard H. Cao
182 <!-- This document is licensed under the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is available at <https://www.gnu.org/licenses/>. -->