index.html 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1" />
  6. <link rel="stylesheet" href="../style.css#" type="text/css" />
  7. <title></title>
  8. <script type="text/javascript">
  9. function findLang(){
  10. let href = location.href;
  11. for(let i=href.length-1;i>0;i--){
  12. if('/'==href.charAt(i) && '/'==href.charAt(i-3))
  13. return i;
  14. }
  15. return 0;
  16. }
  17. function nav2(page){
  18. let i = findLang();
  19. location.href = location.href.substring(0,i+1)+page;
  20. }
  21. function nav2Lang(lang){
  22. let i = findLang();
  23. let href = location.href;
  24. location.href = location.href.substring(0,i-2)+lang+location.href.substring(i);
  25. }
  26. </script>
  27. </head>
  28. <body>
  29. <header class='header'>
  30. <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>
  31. <nav>
  32. </nav>
  33. </header>
  34. <br />
  35. <div class="container">
  36. <h1 class="title">
  37. <br>
  38. <span class="subtitle"></span>
  39. </h1>
  40. <ul class="tags">
  41. </ul>
  42. <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>
  43. <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>
  44. <ul>
  45. <li>lightweight (less than 20k bytes) without bundled electron.</li>
  46. <li>much less memory footprint than edge/chrome browser and highly performant.</li>
  47. <li>keyboard friendly with vim-style keymaps and command line support in address bar.</li>
  48. <li>global redirection to bypass censorship.</li>
  49. <li>user scripts at will. Ex. pressing &quot;tr&quot; to translate the page (need mapkeys.json config).</li>
  50. <li>customizable.</li>
  51. </ul>
  52. <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>
  53. <h4 id="install-for-windows-macos-and-linux">Install (for Windows, MacOS and Linux)</h4>
  54. <p>Install ebrowser with nodejs installed</p>
  55. <pre><code>npm install ebrowser
  56. </code></pre>
  57. <p>Run ebrowser</p>
  58. <pre><code>electron ~/node_modules/ebrowser
  59. </code></pre>
  60. <h4 id="key-shortcuts">Key shortcuts</h4>
  61. <ul>
  62. <li>CTRL+C: stop loading</li>
  63. <li>CTRL+G: address bar to show page url</li>
  64. <li>CTRL+L: focus to address bar</li>
  65. <li>CTRL+T: new Tab</li>
  66. <li>CTRL+SHIFT+T: restore closed Tab</li>
  67. <li>CTRL+TAB: switch to next tab</li>
  68. <li>CTRL+SHIFT+TAB: switch to previous tab</li>
  69. <li>CTRL+W: close Tab</li>
  70. <li>CTRL+&lt;-: go backward</li>
  71. <li>CTRL+-&gt;: go forward</li>
  72. <li>CTRL+SHIFT+R: enable global redirection (&quot;gredirect.json&quot;)</li>
  73. <li>CTRL+R: disable global redirection</li>
  74. <li>ESC: remove focus. similar to vi normal mode.</li>
  75. <li>F5: page refresh/reload</li>
  76. <li>F12: devtools</li>
  77. </ul>
  78. <h4 id="address-bar-commands">Address bar commands</h4>
  79. <ul>
  80. <li>&quot;/&quot; for find-in-page</li>
  81. <li>&quot;:&quot; for address bar commands
  82. <ul>
  83. <li>ac [bookmark/history path w/o ext] : load &quot;.rec&quot; file for autocomplete.</li>
  84. <li>b [bookmarkfilename w/o ext] : bookmark current page in file.</li>
  85. <li>bml [filename w/o extension]: load/execute the javascript file.</li>
  86. <li>cert : allow invalid certificates w/o arguments, otherwise restore to default.</li>
  87. <li>clear : the arguments could be
  88. <ul>
  89. <li>cache : clear cache</li>
  90. <li>dns : clear dns cache</li>
  91. <li>storage: clear site storage data.</li>
  92. <li>{<a href="https://www.electronjs.org/docs/latest/api/session#sescleardataoptions">options</a>}</li>
  93. </ul>
  94. </li>
  95. <li>ext [extension path]: load unpacked Chrome extension.</li>
  96. <li>nc/uc : No Cookie forwarding/Use Cookie forwarding with global redirection.</li>
  97. <li>nh/uh for No/Use url history.</li>
  98. <li>nj/uj for No/Use external Javascript files.</li>
  99. <li>nr/ur for No/Use &quot;redirect.json&quot; for domain redirection.</li>
  100. <li>np : no proxy</li>
  101. <li>up [proxyName] : use proxy. privous proxy or the first proxy in proxy.json w/o [proxyName].</li>
  102. <li>ua [useragentName] : set user agent for future tabs. default user agent w/o arguments.</li>
  103. <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>
  104. </ul>
  105. </li>
  106. <li>&quot;:!&quot; address bar commands</li>
  107. </ul>
  108. <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>
  109. <p>Pressing &quot;ESC&quot; to enter no-focus mode if not sure.</p>
  110. <ul>
  111. <li>&quot;:&quot; for address bar commands</li>
  112. <li>&quot;/&quot; for find-in-page with address bar</li>
  113. <li>&quot;!&quot; for &quot;:!&quot; address bar commands</li>
  114. </ul>
  115. <p>The other commands are defined in &quot;mapkeys.json&quot;, which will map keys to address bar commands.</p>
  116. <h4 id="configuration-files">Configuration files</h4>
  117. <ul>
  118. <li>&quot;config&quot;: lines of address bar commands.</li>
  119. <li>&quot;search.json&quot;: search engines as shortcut-queryUrl pairs.</li>
  120. <li>&quot;default.autoc&quot;: predefined strings for address bar auto completion.</li>
  121. <li>&quot;gredirect.json&quot;: global redirection urls as array of urls</li>
  122. <li>&quot;redirect.json&quot;: domain-replacementDomain pairs, default to be applied.</li>
  123. <li>&quot;mapkeys.json&quot;: keys-addressbarCommands pairs. The addressbar commands are multiple lines of address bar command separated by &quot;\n&quot;.</li>
  124. <li>&quot;proxy.json&quot;: name-<a href="https://www.electronjs.org/docs/latest/api/structures/proxy-config">ProxyConfig</a> pairs</li>
  125. <li>&quot;uas.json&quot; : name-useragent pairs</li>
  126. </ul>
  127. <h4 id="new-usages">New usages</h4>
  128. <ul>
  129. <li>
  130. <p>Vector designing with web tech to replace Adobe Illustrator/Inkscape.</p>
  131. <ul>
  132. <li>
  133. <p>Design with web tech.</p>
  134. </li>
  135. <li>
  136. <p>Printing to pdf with customized paper size.</p>
  137. </li>
  138. <li>
  139. <p>Magnify the pdf paper size to the required size.</p>
  140. </li>
  141. </ul>
  142. <p>OR</p>
  143. <ul>
  144. <li>Adjust window width and use addressbar command line &quot;:Pdf {}&quot; to export vector graphics.</li>
  145. <li>Use imageMagick to convert to any other vector graphics format.</li>
  146. </ul>
  147. </li>
  148. </ul>
  149. </div>
  150. <p>Last Modified: 15 June 2024<br>
  151. <br>
  152. <pre></pre>
  153. </p>
  154. <script id='jsgiscus'
  155. src='https://giscus.app/client.js'
  156. data-repo="torappinfo/uweb"
  157. data-repo-id="MDEwOlJlcG9zaXRvcnkzMDIyMDU3MjE="
  158. data-category="Announcements"
  159. data-category-id="DIC_kwDOEgNLGc4CQjsh"
  160. data-mapping="title"
  161. data-strict="0"
  162. data-reactions-enabled="1"
  163. data-emit-metadata="0"
  164. data-input-position="top"
  165. data-theme="light"
  166. data-lang="en"
  167. data-loading="lazy"
  168. crossorigin="anonymous" async>
  169. </script>
  170. <footer class="site-footer">
  171. <div class="container">
  172. &copy; 2018-2024 Richard H. Cao
  173. </div>
  174. </footer>
  175. <!-- 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/>. -->
  176. </body>
  177. </html>