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><a href=
"https://uweb.surge.sh/en/redirect/index.html#">global redirection
</a> 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=
"installing-for-windows-macos-and-linux">Installing (for Windows, MacOS and Linux)
</h4>
58 <h5 id=
"install-with-prebuilt-binaries">Install with prebuilt binaries
</h5>
59 <p>You can find prebuilt binaries
<a href=
"https://github.com/torappinfo/ebrowser/releases">here
</a>.
</p>
60 <h5 id=
"install-with-nodejs">Install with nodejs
</h5>
61 <pre><code>npm install electron
65 <pre><code>electron ~/node_modules/ebrowser
67 <p>Later on, you can run
"npm install electron
" to update electron/chromium or
"npm install ebrowser
" to update ebrowser independently.
</p>
68 <h5 id=
"update-app-quickly-without-updating-chromium">Update app quickly without updating chromium
</h5>
69 <p>Pressing
"Alt
" to show the menu bar and choose
"Check for updates
" under
"Help
". OR
</p>
70 <p>Type
":update
" in the address bar and press
"enter
" key to update.
</p>
71 <p>Mirror urls could be used like
":update https://uwebzh.netlify.app/misc/ebrowser
". All the mirrors listed on
<a href=
"https://uwebzh.netlify.app/en/readme/index.html">uweb browser
</a> could be used. The update url needs to be changed accordingly to be the folder
"misc/ebrowser
" under the mirror site root url.
</p>
72 <h4 id=
"key-shortcuts">Key shortcuts
</h4>
74 <li>CTRL+C: stop loading
</li>
75 <li>CTRL+G: address bar to show page url
</li>
76 <li>CTRL+L: focus to address bar
</li>
77 <li>CTRL+T: new Tab
</li>
78 <li>CTRL+SHIFT+T: restore closed Tab
</li>
79 <li>CTRL+TAB: switch to next tab
</li>
80 <li>CTRL+SHIFT+TAB: switch to previous tab
</li>
81 <li>CTRL+W: close Tab
</li>
82 <li>ALT+
<-: go backward
</li>
83 <li>ALT+-
>: go forward
</li>
84 <li>CTRL+SHIFT+R: enable global redirection (
"gredirect.json
")
</li>
85 <li>CTRL+R: disable global redirection
</li>
86 <li>ESC: remove focus. similar to vi normal mode.
</li>
88 <li>F5: page refresh/reload
</li>
89 <li>F12: devtools
</li>
91 <h4 id=
"address-bar-commands">Address bar commands
</h4>
93 <li>"/
" for find-in-page
</li>
94 <li>":
" for address bar commands
96 <li>ac [bookmark/history path w/o ext] : load
".rec
" file for autocomplete.
</li>
97 <li>b [bookmarkfilename w/o ext] : bookmark current page in file.
</li>
98 <li>bjs : Browser-level JavaScript execution.
</li>
99 <li>bml [filename w/o extension]: load/execute the javascript file.
</li>
100 <li>cert : allow invalid certificates w/o arguments, otherwise restore to default.
</li>
101 <li>clear : the arguments could be
103 <li>cache : clear cache
</li>
104 <li>dns : clear dns cache
</li>
105 <li>storage: clear site storage data.
</li>
106 <li>{
<a href=
"https://www.electronjs.org/docs/latest/api/session#sescleardataoptions">options
</a>}
</li>
109 <li>ext [extension path]: load unpacked Chrome extension.
</li>
110 <li>gr [gredirect index]: global redirection with corresponding index. Use the first global redirection url if no argument. Disable global redirection with any index out of the range.
</li>
111 <li>js [js code] : execute JS code at OS level. Note:
"javascript:...
" is special url and thus works in the current web page, while
":js ...
" commands can do any OS operations.
</li>
112 <li>nc/uc : No Cookie forwarding/Use Cookie forwarding with global redirection.
</li>
113 <li>nr/ur for No/Use
"redirect.json
" for domain redirection.
</li>
114 <li>np : no proxy.
</li>
115 <li>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
".
</li>
116 <li>ua [useragentName] : set user agent for future tabs. default user agent w/o arguments.
</li>
117 <li>update [updateurl] : update the app. updateurl is optional.
</li>
118 <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>
121 <li>"!
" address bar commands
<br>
122 "!xx ...
" evaluates
"xx.js
" with the whole text as arguments[
0].
</li>
124 <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>
125 <p>Pressing
"ESC
" to enter no-focus mode if not sure.
</p>
127 <li>":
" for address bar commands
</li>
128 <li>"/
" for find-in-page with address bar
</li>
129 <li>"!
" for
"!
" address bar commands
</li>
131 <p>The other commands are defined in
"mapkeys.json
", which will map keys to address bar commands.
</p>
132 <h4 id=
"configuration-files">Configuration files
</h4>
134 <li>"config
": lines of address bar commands.
</li>
135 <li>"search.json
": search engines as shortcut-queryUrl pairs.
</li>
136 <li>"default.autoc
": predefined strings for address bar auto completion.
</li>
137 <li>"gredirect.json
": global redirection urls as array of urls
</li>
138 <li>"redirect.json
": domain-replacementDomain pairs, default to be applied.
</li>
139 <li>"mapkeys.json
": keys-addressbarCommands pairs. The addressbar commands are multiple lines of address bar command separated by
"\n
".
</li>
140 <li>"proxy.json
": name-
<a href=
"https://www.electronjs.org/docs/latest/api/structures/proxy-config">ProxyConfig
</a> pairs
</li>
141 <li>"uas.json
" : name-useragent pairs
</li>
143 <h4 id=
"javascript-at-three-levels">Javascript at three levels
</h4>
145 <li>Web page: urls like
"javascript:
" or bookmarklet command
":bml
" run in web page.
</li>
146 <li>Browser (or renderer process) :
148 <li>":bjs
" to execute the following js code at browser level.
</li>
149 <li>"!xx
" evaluates
"xx.js
", which could manipulate address bar etc.
</li>
152 <li>OS level (or main process) :
":js
" to execute the following js code with all OS APIs available.
</li>
154 <h5 id=
"examples-for-jsbjs-commands">examples for
":js
"/
":bjs
" commands
</h5>
155 <pre><code>:js bJS=true //allow external Javascript files for web pages
156 :js bJS=false //disallow external Javascript files for web pages
157 :bjs bHistory=true //to record url history
158 :bjs bQueryHistory=true //to record query/command history
160 <h4 id=
"new-usages">New usages
</h4>
163 <p>Vector designing with web tech to replace Adobe Illustrator/Inkscape.
</p>
166 <p>Design with web tech.
</p>
169 <p>Printing to pdf with customized paper size.
</p>
172 <p>Magnify the pdf paper size to the required size.
</p>
177 <li>Adjust window width and use addressbar command line
":Pdf {}
" to export vector graphics.
</li>
178 <li>Use imageMagick to convert to any other vector graphics format.
</li>
182 <h4 id=
"license">License
</h4>
183 <p>You can copy or modify the code/program under the terms of the GPL3.0 or later versions.
</p>
186 <p>Last Modified:
24 June
2024<br>
191 <script id='jsgiscus'
192 src='https://giscus.app/client.js'
193 data-repo=
"torappinfo/uweb"
194 data-repo-id=
"MDEwOlJlcG9zaXRvcnkzMDIyMDU3MjE="
195 data-category=
"Announcements"
196 data-category-id=
"DIC_kwDOEgNLGc4CQjsh"
199 data-reactions-enabled=
"1"
200 data-emit-metadata=
"0"
201 data-input-position=
"top"
205 crossorigin=
"anonymous" async
>
208 <footer class=
"site-footer">
209 <div class=
"container">
210 © 2018-
2024 Richard H. Cao
213 <!-- 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/>. -->