ebrowser v1.0.51: download.json to add user-defined context-menu

This commit is contained in:
James Feng Cao 2024-06-30 17:04:50 +08:00
parent f3ea023929
commit 5e3172ece0
16 changed files with 118 additions and 45 deletions

View File

@ -50,7 +50,8 @@
<li>much less memory footprint than edge/chrome browser and highly performant.</li>
<li>keyboard friendly with vim-style keymaps and command line support in address bar.</li>
<li><a href="https://uweb.surge.sh/en/redirect/index.html#">global redirection</a> to bypass censorship.</li>
<li>user scripts at will. Ex. pressing &quot;md&quot; in no-focus mode to preview markdown file.</li>
<li>user CSS/JS at will. Ex. pressing &quot;md&quot; in no-focus mode to preview markdown file.</li>
<li>global CSS/JS for all sites at will.</li>
<li>CSS/JS for domains, similar to <a href="https://jamesfengcao.gitlab.io/uweb/en/sitejs/index.html">uweb</a>, but use sitejs/[domain].js or sitecss/[domain].css, not [domain root].js/css.</li>
<li>customizable.</li>
</ul>
@ -117,7 +118,7 @@ npm install ebrowser
<li>np : no proxy.</li>
<li>up [proxyName] : use proxy. privous proxy or the first proxy in proxy.json w/o [proxyName]. &quot;:up&quot; command also disables global and domain redirections, which are not restored by &quot;:np&quot;.</li>
<li>ua [useragentName] : set user agent for future tabs. default user agent w/o arguments.</li>
<li>update [updateurl] : update the app. updateurl is optional.</li>
<li>update [filename] : update the app w/o argument, otherwise retrive the [filename] from remote. The filename could be any file on <a href="https://jamesfengcao.gitlab.io/uweb/en/readme/index.html">mirror sites</a> (this repository is part of it).</li>
<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>
</ul>
</li>
@ -147,6 +148,7 @@ npm install ebrowser
<li>&quot;mapkeys.json&quot;: keys-addressbarCommands pairs. The addressbar commands are multiple lines of address bar command separated by &quot;\n&quot;.</li>
<li>&quot;proxy.json&quot;: name-<a href="https://www.electronjs.org/docs/latest/api/structures/proxy-config">ProxyConfig</a> pairs</li>
<li>&quot;uas.json&quot; : name-useragent pairs</li>
<li>&quot;download.json&quot; : array of strings to define buttons for downloading dialog. The even-indexed strings are texts to show on the button. The odd-indexed strings are address bar commands with &quot;%u&quot; as the downloaded url.</li>
</ul>
<h4 id="javascript-at-three-levels">Javascript at three levels</h4>
<ul>
@ -191,7 +193,7 @@ npm install ebrowser
<p>You can copy or modify the code/program under the terms of the GPL3.0 or later versions.</p>
</div>
<p>Last Modified: 29 June 2024<br>
<p>Last Modified: 30 June 2024<br>
<br>
<pre></pre>
</p>

View File

@ -6,7 +6,7 @@
<description>Recent content on uweb browser: unlimited power</description>
<generator>Hugo</generator>
<language>en</language>
<lastBuildDate>Sat, 29 Jun 2024 21:05:42 +0800</lastBuildDate>
<lastBuildDate>Sun, 30 Jun 2024 16:27:47 +0800</lastBuildDate>
<atom:link href="/en/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Text selection/processing</title>
@ -55,7 +55,7 @@
<link>/en/search/</link>
<pubDate>Tue, 07 Mar 2023 00:00:00 +0000</pubDate>
<guid>/en/search/</guid>
<description>Clicking the following links to install search engines with uweb browser.&#xA;AI:&#xA;andi:https://andisearch.com/?q=&#xA;thinkany:https://thinkany.so/search?q=&#xA;phind:https://phind-ai.com/search?q=&#xA;devv:https://devv.ai/search?agentMode=false&amp;amp;q=&#xA;perplexity:https://www.perplexity.ai/?q=&#xA;youChat:https://you.com/search?tbm=youchat&amp;amp;q=&#xA;youWrite:https://you.com/search?tbm=youwrite&amp;amp;q=&#xA;youImagine:https://you.com/search?tbm=imagine&amp;amp;q=&#xA;you:https://you.com/search?q=&#xA;medisearch:https://medisearch.io/results/&#xA;explorer:https://explorer.globe.engineer/?q=&#xA;consensus:https://consensus.app/results/?synthesize=on&amp;amp;q=&#xA;yoursearch:https://app.yoursearch.ai/?q=&#xA;chatGPT:i:0/js/hash2textarea.js:https://chat.openai.com/#%s&#xA;lepton:i:0/js/hash2input.js:https://search.lepton.run/#%s&#xA;Recommended engines (click or append any of the following to the file &amp;quot;home5.search&amp;quot;)&#xA;Engines:i:40%s_00&#xA;bing image:http://bing.com/images/search?q=&#xA;google image:http://www.google.com/images?as_q=&#xA;flickr:http://www.flickr.com/photos/tags/&#xA;Yandex image:https://yandex.com/images/search?text=&#xA;wiki:https://en.wikipedia.org/wiki/Special:Search?search=&#xA;wikipedia:http://en.wikipedia.org/?search=&#xA;wikifull:http://en.wikipedia.org/wiki/Special:Search?fulltext=Search&amp;amp;search=&#xA;Youtube:https://www.youtube.com/results?search_query=&#xA;eBay:https://www.ebay.com/sch/i.html?_nkw=&#xA;Quora:https://www.quora.com/search?q=&#xA;Pinterest:https://www.pinterest.com/search/pins/?q=&#xA;LinkedIn:https://www.linkedin.com/search/results/all/?keywords=&#xA;Netflix:https://www.netflix.com/search?q=&#xA;Spotify:https://open.spotify.com/search/&#xA;Medium:https://medium.com/search?q=&#xA;TripAdvisor:https://www.tripadvisor.com/Search?q=&#xA;incaption:https://incaptions.com/&#xA;answer:http://mobile.answers.com/&#xA;twitter:https://twitter.com/search?q=&#xA;Facebook:https://www.facebook.com/search/str/%s/keywords_search&#xA;Instagram:https://www.instagram.com/explore/tags/%s/&#xA;social-search:https://www.social-searcher.com/social-buzz/?q5=&#xA;reddit:http://reddit.com/search?q=&#xA;boardreader:https://boardreader.com/s/%s.html&#xA;bingvideo:https://www.bing.com/videos/search?q=&#xA;vsearch:https://www.vsearch.me/s?q=</description>
<description>Clicking the following links to install search engines with uweb browser.&#xA;AI:&#xA;andi:https://andisearch.com/?q=&#xA;thinkany:https://thinkany.so/search?q=&#xA;phind:https://phind-ai.com/search?q=&#xA;iask:https://iask.ai/?q=&#xA;devv:https://devv.ai/search?agentMode=false&amp;amp;q=&#xA;perplexity:https://www.perplexity.ai/?q=&#xA;youChat:https://you.com/search?tbm=youchat&amp;amp;q=&#xA;youWrite:https://you.com/search?tbm=youwrite&amp;amp;q=&#xA;youImagine:https://you.com/search?tbm=imagine&amp;amp;q=&#xA;you:https://you.com/search?q=&#xA;medisearch:https://medisearch.io/results/&#xA;explorer:https://explorer.globe.engineer/?q=&#xA;consensus:https://consensus.app/results/?synthesize=on&amp;amp;q=&#xA;yoursearch:https://app.yoursearch.ai/?q=&#xA;awesomerepo:https://www.awesome-repositories.com/s/results-with-ai/&#xA;chatGPT:i:0/js/hash2textarea.js:https://chat.openai.com/#%s&#xA;lepton:i:0/js/hash2input.js:https://search.lepton.run/#%s&#xA;Recommended engines (click or append any of the following to the file &amp;quot;home5.search&amp;quot;)&#xA;Engines:i:40%s_00&#xA;bing image:http://bing.com/images/search?q=&#xA;google image:http://www.google.com/images?as_q=&#xA;flickr:http://www.flickr.com/photos/tags/&#xA;Yandex image:https://yandex.com/images/search?text=&#xA;wiki:https://en.wikipedia.org/wiki/Special:Search?search=&#xA;wikipedia:http://en.wikipedia.org/?search=&#xA;wikifull:http://en.wikipedia.org/wiki/Special:Search?fulltext=Search&amp;amp;search=&#xA;Youtube:https://www.youtube.com/results?search_query=&#xA;eBay:https://www.ebay.com/sch/i.html?_nkw=&#xA;Quora:https://www.quora.com/search?q=&#xA;Pinterest:https://www.pinterest.com/search/pins/?q=&#xA;LinkedIn:https://www.linkedin.com/search/results/all/?keywords=&#xA;Netflix:https://www.netflix.com/search?q=&#xA;Spotify:https://open.spotify.com/search/&#xA;Medium:https://medium.com/search?q=&#xA;TripAdvisor:https://www.tripadvisor.com/Search?q=&#xA;incaption:https://incaptions.com/&#xA;answer:http://mobile.answers.com/&#xA;twitter:https://twitter.com/search?q=&#xA;Facebook:https://www.facebook.com/search/str/%s/keywords_search&#xA;Instagram:https://www.instagram.com/explore/tags/%s/&#xA;social-search:https://www.social-searcher.com/social-buzz/?q5=&#xA;reddit:http://reddit.com/search?q=&#xA;boardreader:https://boardreader.com/s/%s.html</description>
</item>
<item>
<title>JS/CSS/HTML/preprocessing for domains</title>
@ -216,7 +216,7 @@
<link>/en/ebrowserreadme/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>/en/ebrowserreadme/</guid>
<description>Ebrowser: keyboard-friendly minimal suckless web browser Ebrowser is designed with the philosophy of Android uweb browser (gitlab).&#xA;lightweight (less than 20k bytes) without bundled electron. much less memory footprint than edge/chrome browser and highly performant. keyboard friendly with vim-style keymaps and command line support in address bar. global redirection to bypass censorship. user scripts at will. Ex. pressing &amp;quot;md&amp;quot; in no-focus mode to preview markdown file. CSS/JS for domains, similar to uweb, but use sitejs/[domain].</description>
<description>Ebrowser: keyboard-friendly minimal suckless web browser Ebrowser is designed with the philosophy of Android uweb browser (gitlab).&#xA;lightweight (less than 20k bytes) without bundled electron. much less memory footprint than edge/chrome browser and highly performant. keyboard friendly with vim-style keymaps and command line support in address bar. global redirection to bypass censorship. user CSS/JS at will. Ex. pressing &amp;quot;md&amp;quot; in no-focus mode to preview markdown file. global CSS/JS for all sites at will.</description>
</item>
<item>
<title></title>

View File

@ -52,6 +52,7 @@
<a href="i:00andi:https://andisearch.com/?q=">andi:https://andisearch.com/?q=</a></p>
<p><a href="i:00thinkany:https://thinkany.so/search?q=">thinkany:https://thinkany.so/search?q=</a></p>
<p><a href="i:00phind:https://phind-ai.com/search?q=">phind:https://phind-ai.com/search?q=</a></p>
<p><a href="i:00iask:https://iask.ai/?q=">iask:https://iask.ai/?q=</a></p>
<p><a href="i:00devv:https://devv.ai/search?agentMode=false&q=">devv:https://devv.ai/search?agentMode=false&amp;q=</a></p>
<p><a href="i:00perplexity:https://www.perplexity.ai/?q=">perplexity:https://www.perplexity.ai/?q=</a></p>
<p><a href="i:00youChat:https://you.com/search?tbm=youchat&q=">youChat:https://you.com/search?tbm=youchat&amp;q=</a></p>
@ -62,6 +63,7 @@
<p><a href="i:00explorer:https://explorer.globe.engineer/?q=">explorer:https://explorer.globe.engineer/?q=</a></p>
<p><a href="i:00consensus:https://consensus.app/results/?synthesize=on&q=">consensus:https://consensus.app/results/?synthesize=on&amp;q=</a></p>
<p><a href="i:00yoursearch:https://app.yoursearch.ai/?q=">yoursearch:https://app.yoursearch.ai/?q=</a></p>
<p><a href="i:00awesomerepo:https://www.awesome-repositories.com/s/results-with-ai/">awesomerepo:https://www.awesome-repositories.com/s/results-with-ai/</a></p>
<p><a href="i:00chatGPT:i:0/js/hash2textarea.js:https://chat.openai.com/#%s">chatGPT:i:0/js/hash2textarea.js:https://chat.openai.com/#%s</a></p>
<p><a href="i:00lepton:i:0/js/hash2input.js:https://search.lepton.run/#%s">lepton:i:0/js/hash2input.js:https://search.lepton.run/#%s</a></p>
<p>Recommended engines (click or append any of the following to the file &quot;home5.search&quot;)<br>
@ -259,7 +261,7 @@
<a href="https://alternativeto.net/software/google-search/?feature=web-search">alternativeto</a></p>
</div>
<p>Last Modified: 8 June 2024<br>
<p>Last Modified: 30 June 2024<br>
add more AI search engines<br>
<pre>Add AI engines
</pre>

View File

@ -71,7 +71,7 @@
/>
</url><url>
<loc>/en/</loc>
<lastmod>2024-06-29T21:05:42+08:00</lastmod>
<lastmod>2024-06-30T16:27:47+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
@ -168,7 +168,7 @@
/>
</url><url>
<loc>/en/search/</loc>
<lastmod>2024-06-08T10:09:00+08:00</lastmod>
<lastmod>2024-06-30T16:27:47+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
@ -181,7 +181,7 @@
/>
</url><url>
<loc>/en/topposts/</loc>
<lastmod>2024-06-18T08:06:41+08:00</lastmod>
<lastmod>2024-06-30T16:27:47+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
@ -508,7 +508,7 @@
/>
</url><url>
<loc>/en/ebrowserreadme/</loc>
<lastmod>2024-06-29T21:05:42+08:00</lastmod>
<lastmod>2024-06-30T15:28:25+08:00</lastmod>
</url><url>
<loc>/en/mirrors/</loc>
<lastmod>2024-06-18T23:17:17+08:00</lastmod>
@ -539,7 +539,7 @@
/>
</url><url>
<loc>/en/unlist/</loc>
<lastmod>2024-06-29T21:05:42+08:00</lastmod>
<lastmod>2024-06-30T15:28:25+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"

View File

@ -6,14 +6,14 @@
<description>Recent content in Topposts on uweb browser: unlimited power</description>
<generator>Hugo</generator>
<language>en</language>
<lastBuildDate>Tue, 18 Jun 2024 08:06:41 +0800</lastBuildDate>
<lastBuildDate>Sun, 30 Jun 2024 16:27:47 +0800</lastBuildDate>
<atom:link href="/en/topposts/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Search engines</title>
<link>/en/search/</link>
<pubDate>Tue, 07 Mar 2023 00:00:00 +0000</pubDate>
<guid>/en/search/</guid>
<description>Clicking the following links to install search engines with uweb browser.&#xA;AI:&#xA;andi:https://andisearch.com/?q=&#xA;thinkany:https://thinkany.so/search?q=&#xA;phind:https://phind-ai.com/search?q=&#xA;devv:https://devv.ai/search?agentMode=false&amp;amp;q=&#xA;perplexity:https://www.perplexity.ai/?q=&#xA;youChat:https://you.com/search?tbm=youchat&amp;amp;q=&#xA;youWrite:https://you.com/search?tbm=youwrite&amp;amp;q=&#xA;youImagine:https://you.com/search?tbm=imagine&amp;amp;q=&#xA;you:https://you.com/search?q=&#xA;medisearch:https://medisearch.io/results/&#xA;explorer:https://explorer.globe.engineer/?q=&#xA;consensus:https://consensus.app/results/?synthesize=on&amp;amp;q=&#xA;yoursearch:https://app.yoursearch.ai/?q=&#xA;chatGPT:i:0/js/hash2textarea.js:https://chat.openai.com/#%s&#xA;lepton:i:0/js/hash2input.js:https://search.lepton.run/#%s&#xA;Recommended engines (click or append any of the following to the file &amp;quot;home5.search&amp;quot;)&#xA;Engines:i:40%s_00&#xA;bing image:http://bing.com/images/search?q=&#xA;google image:http://www.google.com/images?as_q=&#xA;flickr:http://www.flickr.com/photos/tags/&#xA;Yandex image:https://yandex.com/images/search?text=&#xA;wiki:https://en.wikipedia.org/wiki/Special:Search?search=&#xA;wikipedia:http://en.wikipedia.org/?search=&#xA;wikifull:http://en.wikipedia.org/wiki/Special:Search?fulltext=Search&amp;amp;search=&#xA;Youtube:https://www.youtube.com/results?search_query=&#xA;eBay:https://www.ebay.com/sch/i.html?_nkw=&#xA;Quora:https://www.quora.com/search?q=&#xA;Pinterest:https://www.pinterest.com/search/pins/?q=&#xA;LinkedIn:https://www.linkedin.com/search/results/all/?keywords=&#xA;Netflix:https://www.netflix.com/search?q=&#xA;Spotify:https://open.spotify.com/search/&#xA;Medium:https://medium.com/search?q=&#xA;TripAdvisor:https://www.tripadvisor.com/Search?q=&#xA;incaption:https://incaptions.com/&#xA;answer:http://mobile.answers.com/&#xA;twitter:https://twitter.com/search?q=&#xA;Facebook:https://www.facebook.com/search/str/%s/keywords_search&#xA;Instagram:https://www.instagram.com/explore/tags/%s/&#xA;social-search:https://www.social-searcher.com/social-buzz/?q5=&#xA;reddit:http://reddit.com/search?q=&#xA;boardreader:https://boardreader.com/s/%s.html&#xA;bingvideo:https://www.bing.com/videos/search?q=&#xA;vsearch:https://www.vsearch.me/s?q=</description>
<description>Clicking the following links to install search engines with uweb browser.&#xA;AI:&#xA;andi:https://andisearch.com/?q=&#xA;thinkany:https://thinkany.so/search?q=&#xA;phind:https://phind-ai.com/search?q=&#xA;iask:https://iask.ai/?q=&#xA;devv:https://devv.ai/search?agentMode=false&amp;amp;q=&#xA;perplexity:https://www.perplexity.ai/?q=&#xA;youChat:https://you.com/search?tbm=youchat&amp;amp;q=&#xA;youWrite:https://you.com/search?tbm=youwrite&amp;amp;q=&#xA;youImagine:https://you.com/search?tbm=imagine&amp;amp;q=&#xA;you:https://you.com/search?q=&#xA;medisearch:https://medisearch.io/results/&#xA;explorer:https://explorer.globe.engineer/?q=&#xA;consensus:https://consensus.app/results/?synthesize=on&amp;amp;q=&#xA;yoursearch:https://app.yoursearch.ai/?q=&#xA;awesomerepo:https://www.awesome-repositories.com/s/results-with-ai/&#xA;chatGPT:i:0/js/hash2textarea.js:https://chat.openai.com/#%s&#xA;lepton:i:0/js/hash2input.js:https://search.lepton.run/#%s&#xA;Recommended engines (click or append any of the following to the file &amp;quot;home5.search&amp;quot;)&#xA;Engines:i:40%s_00&#xA;bing image:http://bing.com/images/search?q=&#xA;google image:http://www.google.com/images?as_q=&#xA;flickr:http://www.flickr.com/photos/tags/&#xA;Yandex image:https://yandex.com/images/search?text=&#xA;wiki:https://en.wikipedia.org/wiki/Special:Search?search=&#xA;wikipedia:http://en.wikipedia.org/?search=&#xA;wikifull:http://en.wikipedia.org/wiki/Special:Search?fulltext=Search&amp;amp;search=&#xA;Youtube:https://www.youtube.com/results?search_query=&#xA;eBay:https://www.ebay.com/sch/i.html?_nkw=&#xA;Quora:https://www.quora.com/search?q=&#xA;Pinterest:https://www.pinterest.com/search/pins/?q=&#xA;LinkedIn:https://www.linkedin.com/search/results/all/?keywords=&#xA;Netflix:https://www.netflix.com/search?q=&#xA;Spotify:https://open.spotify.com/search/&#xA;Medium:https://medium.com/search?q=&#xA;TripAdvisor:https://www.tripadvisor.com/Search?q=&#xA;incaption:https://incaptions.com/&#xA;answer:http://mobile.answers.com/&#xA;twitter:https://twitter.com/search?q=&#xA;Facebook:https://www.facebook.com/search/str/%s/keywords_search&#xA;Instagram:https://www.instagram.com/explore/tags/%s/&#xA;social-search:https://www.social-searcher.com/social-buzz/?q5=&#xA;reddit:http://reddit.com/search?q=&#xA;boardreader:https://boardreader.com/s/%s.html</description>
</item>
<item>
<title>Downloads</title>

View File

@ -12,7 +12,7 @@
<link>/en/ebrowserreadme/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>/en/ebrowserreadme/</guid>
<description>Ebrowser: keyboard-friendly minimal suckless web browser Ebrowser is designed with the philosophy of Android uweb browser (gitlab).&#xA;lightweight (less than 20k bytes) without bundled electron. much less memory footprint than edge/chrome browser and highly performant. keyboard friendly with vim-style keymaps and command line support in address bar. global redirection to bypass censorship. user scripts at will. Ex. pressing &amp;quot;md&amp;quot; in no-focus mode to preview markdown file. CSS/JS for domains, similar to uweb, but use sitejs/[domain].</description>
<description>Ebrowser: keyboard-friendly minimal suckless web browser Ebrowser is designed with the philosophy of Android uweb browser (gitlab).&#xA;lightweight (less than 20k bytes) without bundled electron. much less memory footprint than edge/chrome browser and highly performant. keyboard friendly with vim-style keymaps and command line support in address bar. global redirection to bypass censorship. user CSS/JS at will. Ex. pressing &amp;quot;md&amp;quot; in no-focus mode to preview markdown file. global CSS/JS for all sites at will.</description>
</item>
<item>
<title></title>

View File

@ -5,7 +5,8 @@ Ebrowser is designed with the philosophy of [Android uweb browser](https://githu
- much less memory footprint than edge/chrome browser and highly performant.
- keyboard friendly with vim-style keymaps and command line support in address bar.
- [global redirection](https://uweb.surge.sh/en/redirect/index.html#) to bypass censorship.
- user scripts at will. Ex. pressing "md" in no-focus mode to preview markdown file.
- user CSS/JS at will. Ex. pressing "md" in no-focus mode to preview markdown file.
- global CSS/JS for all sites at will.
- CSS/JS for domains, similar to [uweb](https://jamesfengcao.gitlab.io/uweb/en/sitejs/index.html), but use sitejs/[domain].js or sitecss/[domain].css, not [domain root].js/css.
- customizable.
@ -74,7 +75,7 @@ Like any popular browser, the very first word in address bar if defined in "sear
- 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".
- ua [useragentName] : set user agent for future tabs. default user agent w/o arguments.
- update [updateurl] : update the app. updateurl is optional.
- update [filename] : update the app w/o argument, otherwise retrive the [filename] from remote. The filename could be any file on [mirror sites](https://jamesfengcao.gitlab.io/uweb/en/readme/index.html) (this repository is part of it).
- 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.
- "!" address bar commands
"!xx ..." evaluates "xx.js" with the whole text as arguments[0].
@ -98,6 +99,7 @@ The other commands are defined in "mapkeys.json", which will map keys to address
- "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
- "download.json" : array of strings to define buttons for downloading dialog. The even-indexed strings are texts to show on the button. The odd-indexed strings are address bar commands with "%u" as the downloaded url.
#### Javascript at three levels
- Web page: url like "javascript:" or bookmarklet command ":bml" runs in web page.

View File

@ -71,6 +71,9 @@ You should have received a copy of the GNU General Public License along with thi
var bQueryHistory = false;
let sitecssP = path.join(__dirname,"sitecss");
let sitejsP = path.join(__dirname,"sitejs");
let gjsA = [];
let gcssA = [];
let gcssJSA = [];
var bDomainJS = fs.existsSync(sitejsP);
var bDomainCSS = fs.existsSync(sitecssP);
var autocMode = 0; //0 for substring, 1 for startsWith
@ -141,12 +144,16 @@ You should have received a copy of the GNU General Public License along with thi
tabs.children[iTab].classList.add('curWV');
}
async function loadJSFile(tab,jsF){
if(fs.existsSync(jsF)){
try {
let js = await fs.promises.readFile(jsF,'utf8');
tab.executeJavaScript(js,false);
}catch(e){}
}
}
async function loadCSSFile(tab,jsF){
try {
let js = await fs.promises.readFile(jsF,'utf8');
tab.insertCSS(css);
}catch(e){}
}
function cbStartLoading(e){
if(!bDomainCSS) return;
@ -158,14 +165,15 @@ You should have received a copy of the GNU General Public License along with thi
let jsF = path.join(sitecssP, domain+".js");
loadJSFile(tab,jsF);
jsF = path.join(sitecssP, domain+".css");
if(fs.existsSync(jsF)){
(async ()=>{
try {
let css = await fs.promises.readFile(jsF,'utf8');
tab.insertCSS(css);
}catch(e){}
})();
}
loadCSSFile(tab,jsF);
gcssA.forEach((fname)=>{
jsF = path.join(__dirname, fname);
loadCSSFile(tab,jsF);
});
gcssJSA.forEach((fname)=>{
jsF = path.join(__dirname, fname);
loadJSFile(tab,jsF);
});
}
function cbFinishLoad(e){
let tab = e.target;
@ -184,6 +192,10 @@ You should have received a copy of the GNU General Public License along with thi
let jsF = path.join(sitejsP, domain+".js");
loadJSFile(tab,jsF);
}
gjsA.forEach((fname)=>{
let jsF = path.join(__dirname, fname);
loadJSFile(tab,jsF);
});
}
function initTab(tab){
tab.allowpopups = true;

View File

@ -1,4 +1,4 @@
{"version":"1.0.45",
{"version":"1.0.51",
"name": "ebrowser",
"description": "The keyboard-friendly minimal suckless web browser",
"main": "webview.js",

View File

@ -9,6 +9,7 @@
"andi":"https://andisearch.com/?q=%s",
"ph":"https://phind-ai.com/search?q=%s",
"gf":"https://greasyfork.org/en/scripts?filter_locale=0&sort=updated&q=%s",
"repo":"https://www.awesome-repositories.com/s/results-with-ai/%s",
"dev":"https://devv.ai/search?agentMode=false&q=%s",
"you":"https://you.com/search?tbm=youchat&q=%s",
"p":"https://www.perplexity.ai/?q=%s",

View File

@ -50,6 +50,7 @@ var bForwardCookie = false;
var proxies = {};
var proxy;
var useragents = {};
var downloadMenus; //[]
var defaultUA =
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/" +
process.versions.chrome +" Safari/537.36";
@ -115,10 +116,45 @@ async function createWindow () {
cmdlineProcess(process.argv, process.cwd(), 0);
//app.commandLine.appendSwitch ('trace-warnings');
fs.readFile(path.join(__dirname,'download.json'), 'utf8', (err, jsonStr) => {
if (err) return;
try {
downloadMenus = JSON.parse(jsonStr);
}catch (e){console.log(e)}
});
win.webContents.on('page-title-updated',(event,cmd)=>{
addrCommand(cmd);
});
session.defaultSession.on("will-download", (e, item) => {
//item.setSavePath(save)
if(!downloadMenus) return;
let buttons = ["OK", "Cancel", translate("Copy")];
buttons.push(downloadMenus.filter((item, index) => (index&1) === 0));
const button = dialog.showMessageBoxSync(mainWindow, {
"type": "question",
"title": translate("Download"),
"message": `Do you want to download the file?`,
"buttons": buttons,
"defaultId": 0,
});
switch(button) {
case 0:
return;
case 1:
break;
case 2:
clipboard.writeText(item.getURL());
break;
default:
let cmd = downloadMenus[2*button-5].replace('%u',item.getURL());
let js = `handleQuery(\`${cmd}\`)`;
win.webContents.executeJavaScript(js,false);
}
e.preventDefault();
});
win.webContents.on('console-message',cbConsoleMsg);
}
@ -238,12 +274,16 @@ function addrCommand(cmd){
case "update":
let updateurl;
if(1==args.length)
updateurl = repositoryurl;
updateApp(repositoryurl);
else {
updateurl = args[1];
if(!updateurl.endsWith("/")) updateurl = updateurl +"/";
filename = args[1];
let iSlash = filename.lastIndexOf('/');
if(iSlash>0){
let folder = path.join(__dirname,filename.substring(0,iSlash));
fs.mkdirSync(folder,{ recursive: true });
}
fetch2file(repositoryurl,filename);
}
updateApp(updateurl);
return;
}
}
@ -317,24 +357,36 @@ function cbTitleUpdate(event,title){
function menuArray(labelprefix, linkUrl){
const menuTemplate = [
{
label: labelprefix+'Open Link',
label: labelprefix+translate('Open'),
click: () => {
shell.openExternal(linkUrl);
}
},
{
label: labelprefix+'Copy Link',
label: labelprefix+translate('Copy'),
click: () => {
clipboard.writeText(linkUrl);
}
},
{
label: labelprefix+'Download',
label: labelprefix+translate('Download'),
click: () => {
win.contentView.children[i].webContents.downloadURL(linkUrl);
}
},
];
if(downloadMenus){
for(let i=0; i<downloadMenus.length-1;i++){
menuTemplate.push({
label: labelprefix+downloadMenus[i],
click: () => {
let cmd = downloadMenus[i+1].replace('%u',linkUrl);
let js = `handleQuery(\`${cmd}\`)`;
win.webContents.executeJavaScript(js,false);
}
});
}
}
return menuTemplate;
}

View File

@ -4,14 +4,14 @@
<sitemap>
<loc>/en/sitemap.xml</loc>
<lastmod>2024-06-29T21:05:42+08:00</lastmod>
<lastmod>2024-06-30T16:27:47+08:00</lastmod>
</sitemap>
<sitemap>
<loc>/zh/sitemap.xml</loc>
<lastmod>2024-06-29T22:03:52+08:00</lastmod>
<lastmod>2024-06-29T22:26:41+08:00</lastmod>
</sitemap>

View File

@ -6,7 +6,7 @@
<description>Recent content in _Posts on 超微浏览器: 威、快、高效、极致优化</description>
<generator>Hugo</generator>
<language>zh</language>
<lastBuildDate>Fri, 28 Jun 2024 15:52:31 +0800</lastBuildDate>
<lastBuildDate>Sat, 29 Jun 2024 22:26:41 +0800</lastBuildDate>
<atom:link href="/zh/_posts/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>操作选中(富)文本/元素</title>
@ -83,7 +83,7 @@
<link>/zh/bookmark/</link>
<pubDate>Wed, 18 May 2022 00:00:00 +0000</pubDate>
<guid>/zh/bookmark/</guid>
<description>所有书签都可通过&amp;quot;长按链接-&amp;gt;命令-&amp;gt;书签&amp;quot;保存链接为书签。书签菜单可至特色服务网页安装。&#xA;AI/chatGPT:&#xA;kimi taichu 文本/文件共享&#xA;网络剪贴板 txtpad getnote cmd.im Wait for url from other devices&#xA;gamezop&#xA;分类书签模板 点击以下链接可安装模板至分类书签目录。保存至“小说”类别的网站会自动使用阅读模式。&#xA;&amp;quot;小说.html&amp;quot;: 自动使用阅读模式&#xA;href=&amp;quot;i:0hbookmark/txt.html:../searchurl/bookmark/viewtxt.html&amp;quot;&amp;gt;&amp;quot;txt.html&amp;quot;: 在线阅读下载直链(txt/html)&#xA;镜像 google镜像&#xA;Google等镜像&#xA;Termux命令书签 以下书签需&amp;quot;长按以下链接-&amp;gt;新窗口打开&amp;quot;才能在此网页正常执行。&#xA;需安装定制版termux及相应工具&#xA;计算器bc&#xA;全能计算器bc</description>
<description>所有书签都可通过&amp;quot;长按链接-&amp;gt;命令-&amp;gt;书签&amp;quot;保存链接为书签。书签菜单可至特色服务网页安装。&#xA;AI/chatGPT:&#xA;kimi yuanbao taichu deepseek 文本/文件共享&#xA;网络剪贴板 txtpad getnote cmd.im Wait for url from other devices&#xA;gamezop&#xA;分类书签模板 点击以下链接可安装模板至分类书签目录。保存至“小说”类别的网站会自动使用阅读模式。&#xA;&amp;quot;小说.html&amp;quot;: 自动使用阅读模式&#xA;href=&amp;quot;i:0hbookmark/txt.html:../searchurl/bookmark/viewtxt.html&amp;quot;&amp;gt;&amp;quot;txt.html&amp;quot;: 在线阅读下载直链(txt/html)&#xA;镜像 google镜像&#xA;Google等镜像&#xA;Termux命令书签 以下书签需&amp;quot;长按以下链接-&amp;gt;新窗口打开&amp;quot;才能在此网页正常执行。&#xA;需安装定制版termux及相应工具&#xA;计算器bc&#xA;全能计算器bc</description>
</item>
<item>
<title>利用用户自定义样式屏蔽不良信息</title>

View File

@ -51,7 +51,9 @@
AI/chatGPT:</p>
<ul>
<li><a href="https://kimi.ai">kimi</a></li>
<li><a href="https://yuanbao.tencent.com/chat">yuanbao</a></li>
<li><a href="https://taichu-web.ia.ac.cn/#/chat">taichu</a></li>
<li><a href="https://chat.deepseek.com/coder">deepseek</a></li>
</ul>
<p>文本/文件共享</p>
<ul>
@ -76,7 +78,7 @@ AI/chatGPT:</p>
<a href="c:bc -l *.bc">全能计算器bc</a></p>
</div>
<p>Last Modified: 28 June 2024<br>
<p>Last Modified: 29 June 2024<br>
add AI engines<br>
<pre></pre>
</p>

View File

@ -6,7 +6,7 @@
<description>Recent content on 超微浏览器: 威、快、高效、极致优化</description>
<generator>Hugo</generator>
<language>zh</language>
<lastBuildDate>Sat, 29 Jun 2024 22:03:52 +0800</lastBuildDate>
<lastBuildDate>Sat, 29 Jun 2024 22:26:41 +0800</lastBuildDate>
<atom:link href="/zh/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>操作选中(富)文本/元素</title>
@ -111,7 +111,7 @@
<link>/zh/bookmark/</link>
<pubDate>Wed, 18 May 2022 00:00:00 +0000</pubDate>
<guid>/zh/bookmark/</guid>
<description>所有书签都可通过&amp;quot;长按链接-&amp;gt;命令-&amp;gt;书签&amp;quot;保存链接为书签。书签菜单可至特色服务网页安装。&#xA;AI/chatGPT:&#xA;kimi taichu 文本/文件共享&#xA;网络剪贴板 txtpad getnote cmd.im Wait for url from other devices&#xA;gamezop&#xA;分类书签模板 点击以下链接可安装模板至分类书签目录。保存至“小说”类别的网站会自动使用阅读模式。&#xA;&amp;quot;小说.html&amp;quot;: 自动使用阅读模式&#xA;href=&amp;quot;i:0hbookmark/txt.html:../searchurl/bookmark/viewtxt.html&amp;quot;&amp;gt;&amp;quot;txt.html&amp;quot;: 在线阅读下载直链(txt/html)&#xA;镜像 google镜像&#xA;Google等镜像&#xA;Termux命令书签 以下书签需&amp;quot;长按以下链接-&amp;gt;新窗口打开&amp;quot;才能在此网页正常执行。&#xA;需安装定制版termux及相应工具&#xA;计算器bc&#xA;全能计算器bc</description>
<description>所有书签都可通过&amp;quot;长按链接-&amp;gt;命令-&amp;gt;书签&amp;quot;保存链接为书签。书签菜单可至特色服务网页安装。&#xA;AI/chatGPT:&#xA;kimi yuanbao taichu deepseek 文本/文件共享&#xA;网络剪贴板 txtpad getnote cmd.im Wait for url from other devices&#xA;gamezop&#xA;分类书签模板 点击以下链接可安装模板至分类书签目录。保存至“小说”类别的网站会自动使用阅读模式。&#xA;&amp;quot;小说.html&amp;quot;: 自动使用阅读模式&#xA;href=&amp;quot;i:0hbookmark/txt.html:../searchurl/bookmark/viewtxt.html&amp;quot;&amp;gt;&amp;quot;txt.html&amp;quot;: 在线阅读下载直链(txt/html)&#xA;镜像 google镜像&#xA;Google等镜像&#xA;Termux命令书签 以下书签需&amp;quot;长按以下链接-&amp;gt;新窗口打开&amp;quot;才能在此网页正常执行。&#xA;需安装定制版termux及相应工具&#xA;计算器bc&#xA;全能计算器bc</description>
</item>
<item>
<title>利用用户自定义样式屏蔽不良信息</title>

View File

@ -3,7 +3,7 @@
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>/zh/_posts/</loc>
<lastmod>2024-06-28T15:52:31+08:00</lastmod>
<lastmod>2024-06-29T22:26:41+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="en"
@ -81,7 +81,7 @@
/>
</url><url>
<loc>/zh/</loc>
<lastmod>2024-06-29T22:03:52+08:00</lastmod>
<lastmod>2024-06-29T22:26:41+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="en"
@ -291,7 +291,7 @@
<lastmod>2024-05-20T11:27:34+08:00</lastmod>
</url><url>
<loc>/zh/bookmark/</loc>
<lastmod>2024-06-28T15:52:31+08:00</lastmod>
<lastmod>2024-06-29T22:26:41+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="en"