updates ebrowser
[uweb.git] / en / ebrowserreadme / index.html
blob0db5af732a2c026b4a9396d54bcdbeba3c393ba8
1 <!doctype html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1" />
7 <link rel="stylesheet" href="../style.css#" type="text/css" />
8 <title></title>
9 <script type="text/javascript">
10 function findLang(){
11 let href = location.href;
12 for(let i=href.length-1;i>0;i--){
13 if('/'==href.charAt(i) && '/'==href.charAt(i-3))
14 return i;
16 return 0;
18 function nav2(page){
19 let i = findLang();
20 location.href = location.href.substring(0,i+1)+page;
22 function nav2Lang(lang){
23 let i = findLang();
24 let href = location.href;
25 location.href = location.href.substring(0,i-2)+lang+location.href.substring(i);
27 </script>
28 </head>
29 <body>
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>
33 <nav>
34 </nav>
35 </header>
36 <br />
38 <div class="container">
39 <h1 class="title">
40 <br>
41 <span class="subtitle"></span>
42 </h1>
43 <ul class="tags">
45 </ul>
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>
48 <ul>
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 &quot;tr&quot; to translate the page (need mapkeys.json config).</li>
54 <li>customizable.</li>
55 </ul>
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
60 </code></pre>
61 <p>Run ebrowser</p>
62 <pre><code>electron ~/node_modules/ebrowser
63 </code></pre>
64 <h4 id="key-shortcuts">Key shortcuts</h4>
65 <ul>
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+&lt;-: go backward</li>
75 <li>CTRL+-&gt;: go forward</li>
76 <li>CTRL+SHIFT+R: enable global redirection (&quot;gredirect.json&quot;)</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>
81 </ul>
82 <h4 id="address-bar-commands">Address bar commands</h4>
83 <ul>
84 <li>&quot;/&quot; for find-in-page</li>
85 <li>&quot;:&quot; for address bar commands
86 <ul>
87 <li>ac [bookmark/history path w/o ext] : load &quot;.rec&quot; 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
92 <ul>
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>
97 </ul>
98 </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 &quot;redirect.json&quot; 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 &quot;{}&quot; to capture long screenshot as vector graphics.</li>
108 </ul>
109 </li>
110 <li>&quot;:!&quot; address bar commands</li>
111 </ul>
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 &quot;ESC&quot; to enter no-focus mode if not sure.</p>
114 <ul>
115 <li>&quot;:&quot; for address bar commands</li>
116 <li>&quot;/&quot; for find-in-page with address bar</li>
117 <li>&quot;!&quot; for &quot;:!&quot; address bar commands</li>
118 </ul>
119 <p>The other commands are defined in &quot;mapkeys.json&quot;, which will map keys to address bar commands.</p>
120 <h4 id="configuration-files">Configuration files</h4>
121 <ul>
122 <li>&quot;config&quot;: lines of address bar commands.</li>
123 <li>&quot;search.json&quot;: search engines as shortcut-queryUrl pairs.</li>
124 <li>&quot;default.autoc&quot;: predefined strings for address bar auto completion.</li>
125 <li>&quot;gredirect.json&quot;: global redirection urls as array of urls</li>
126 <li>&quot;redirect.json&quot;: domain-replacementDomain pairs, default to be applied.</li>
127 <li>&quot;mapkeys.json&quot;: keys-addressbarCommands pairs. The addressbar commands are multiple lines of address bar command separated by &quot;\n&quot;.</li>
128 <li>&quot;proxy.json&quot;: name-<a href="https://www.electronjs.org/docs/latest/api/structures/proxy-config">ProxyConfig</a> pairs</li>
129 <li>&quot;uas.json&quot; : name-useragent pairs</li>
130 </ul>
131 <h4 id="new-usages">New usages</h4>
132 <ul>
133 <li>
134 <p>Vector designing with web tech to replace Adobe Illustrator/Inkscape.</p>
135 <ul>
136 <li>
137 <p>Design with web tech.</p>
138 </li>
139 <li>
140 <p>Printing to pdf with customized paper size.</p>
141 </li>
142 <li>
143 <p>Magnify the pdf paper size to the required size.</p>
144 </li>
145 </ul>
146 <p>OR</p>
147 <ul>
148 <li>Adjust window width and use addressbar command line &quot;:Pdf {}&quot; to export vector graphics.</li>
149 <li>Use imageMagick to convert to any other vector graphics format.</li>
150 </ul>
151 </li>
152 </ul>
154 </div>
155 <p>Last Modified: 15 June 2024<br>
156 <br>
157 <pre></pre>
158 </p>
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"
166 data-mapping="title"
167 data-strict="0"
168 data-reactions-enabled="1"
169 data-emit-metadata="0"
170 data-input-position="top"
171 data-theme="light"
172 data-lang="en"
173 data-loading="lazy"
174 crossorigin="anonymous" async>
175 </script>
177 <footer class="site-footer">
178 <div class="container">
179 &copy; 2018-2024 Richard H. Cao
180 </div>
181 </footer>
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/>. -->
185 </body>
186 </html>