2024-06-15 03:36:06 +00:00
### [Ebrowser](https://github.com/torappinfo/ebrowser): keyboard-friendly minimal suckless web browser
Ebrowser is designed with the philosophy of [Android uweb browser ](https://github.com/torappinfo/uweb ) ([gitlab](https://gitlab.com/jamesfengcao/uweb)).
2024-06-11 10:42:38 +00:00
- lightweight (less than 20k bytes) without bundled electron.
- much less memory footprint than edge/chrome browser and highly performant.
2024-06-15 03:36:06 +00:00
- keyboard friendly with vim-style keymaps and command line support in address bar.
2024-06-18 02:41:17 +00:00
- [global redirection ](https://uweb.surge.sh/en/redirect/index.html# ) to bypass censorship.
2024-06-15 03:36:06 +00:00
- user scripts at will. Ex. pressing "tr" to translate the page (need mapkeys.json config).
2024-06-11 10:42:38 +00:00
- customizable.
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.
2024-06-18 02:41:17 +00:00
#### Installing (for Windows, MacOS and Linux)
##### Install with prebuilt binaries
You can find prebuilt binaries [here ](https://github.com/torappinfo/ebrowser/releases ).
2024-06-11 10:42:38 +00:00
2024-06-19 07:25:23 +00:00
##### Install with nodejs
2024-06-18 02:41:17 +00:00
npm install electron
2024-06-11 10:42:38 +00:00
npm install ebrowser
Run ebrowser
electron ~/node_modules/ebrowser
2024-06-18 02:41:17 +00:00
Later on, you can run "npm install electron" to update electron/chromium or "npm install ebrowser" to update ebrowser independently.
2024-06-18 22:36:48 +00:00
##### Update app quickly without updating chromium
Pressing "Alt" to show the menu bar and choose "Check for updates" under "Help". OR
Type ":update" in the address bar and press "enter" key to update.
2024-06-18 23:00:19 +00:00
Mirror urls could be used like ":update https://uwebzh.netlify.app/misc/ebrowser". All the mirrors listed on [uweb browser ](https://uwebzh.netlify.app/en/readme/index.html ) could be used. The update url needs to be changed accordingly to be the folder "misc/ebrowser" under the mirror site root url.
2024-06-18 22:36:48 +00:00
2024-06-11 10:42:38 +00:00
#### Key shortcuts
2024-06-15 03:36:06 +00:00
- CTRL+C: stop loading
2024-06-11 10:42:38 +00:00
- CTRL+G: address bar to show page url
- CTRL+L: focus to address bar
- CTRL+T: new Tab
2024-06-15 03:36:06 +00:00
- CTRL+SHIFT+T: restore closed Tab
2024-06-11 10:42:38 +00:00
- CTRL+TAB: switch to next tab
- CTRL+SHIFT+TAB: switch to previous tab
- CTRL+W: close Tab
- CTRL+< -: go backward
- CTRL+->: go forward
- CTRL+SHIFT+R: enable global redirection ("gredirect.json")
- CTRL+R: disable global redirection
- ESC: remove focus. similar to vi normal mode.
2024-06-18 23:00:19 +00:00
- F1: Help
2024-06-11 10:42:38 +00:00
- F5: page refresh/reload
- F12: devtools
#### Address bar commands
- "/" for find-in-page
- ":" for address bar commands
2024-06-13 00:07:31 +00:00
- ac [bookmark/history path w/o ext] : load ".rec" file for autocomplete.
2024-06-11 10:42:38 +00:00
- b [bookmarkfilename w/o ext] : bookmark current page in file.
- bml [filename w/o extension]: load/execute the javascript file.
- cert : allow invalid certificates w/o arguments, otherwise restore to default.
- clear : the arguments could be
- cache : clear cache
- dns : clear dns cache
- storage: clear site storage data.
2024-06-15 03:36:06 +00:00
- {[options](https://www.electronjs.org/docs/latest/api/session#sescleardataoptions)}
2024-06-11 10:42:38 +00:00
- ext [extension path]: load unpacked Chrome extension.
2024-06-18 15:28:12 +00:00
- 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.
2024-06-15 03:36:06 +00:00
- nc/uc : No Cookie forwarding/Use Cookie forwarding with global redirection.
2024-06-11 10:42:38 +00:00
- nh/uh for No/Use url history.
- nj/uj for No/Use external Javascript files.
- nr/ur for No/Use "redirect.json" for domain redirection.
2024-06-18 02:41:17 +00:00
- np : no proxy.
- 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".
2024-06-11 10:42:38 +00:00
- ua [useragentName] : set user agent for future tabs. default user agent w/o arguments.
2024-06-18 15:28:12 +00:00
- update [updateurl] : update the app. updateurl is optional.
2024-06-11 10:42:38 +00:00
- 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.
2024-06-18 15:28:12 +00:00
- "!" address bar commands
2024-06-18 02:41:17 +00:00
"!xx ..." evaluates "xx.js" with the whole address bar text as arguments[0].
2024-06-11 10:42:38 +00:00
#### Commands in no-focus mode (this mode is similar to vi Normal mode)
Pressing "ESC" to enter no-focus mode if not sure.
2024-06-13 00:07:31 +00:00
- ":" for address bar commands
- "/" for find-in-page with address bar
2024-06-18 15:28:12 +00:00
- "!" for "!" address bar commands
2024-06-13 00:07:31 +00:00
The other commands are defined in "mapkeys.json", which will map keys to address bar commands.
2024-06-11 10:42:38 +00:00
#### Configuration files
- "config": lines of address bar commands.
- "search.json": search engines as shortcut-queryUrl pairs.
- "default.autoc": predefined strings for address bar auto completion.
- "gredirect.json": global redirection urls as array of urls
- "redirect.json": domain-replacementDomain pairs, default to be applied.
- "mapkeys.json": keys-addressbarCommands pairs. The addressbar commands are multiple lines of address bar command separated by "\n".
- "proxy.json": name-[ProxyConfig](https://www.electronjs.org/docs/latest/api/structures/proxy-config) pairs
- "uas.json" : name-useragent pairs
#### New usages
- Vector designing with web tech to replace Adobe Illustrator/Inkscape.
- Design with web tech.
- Printing to pdf with customized paper size.
- Magnify the pdf paper size to the required size.
OR
- Adjust window width and use addressbar command line ":Pdf {}" to export vector graphics.
2024-06-18 02:41:17 +00:00
- Use imageMagick to convert to any other vector graphics format.
#### License
You can copy or modify the code/program under the terms of the GPL3.0 or later versions.