mirror of
https://github.com/torappinfo/uweb.git
synced 2026-03-14 14:45:45 +01:00
uweb 1122: offline site cache to support urls with special chars like ? etc
This commit is contained in:
parent
3d3eb3b6cc
commit
24f7bfa0b2
19 changed files with 52 additions and 51 deletions
|
|
@ -56,6 +56,7 @@
|
|||
<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>
|
||||
<li>dark theme support.</li>
|
||||
</ul>
|
||||
<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>
|
||||
<h4 id="installing-for-windows-macos-and-linux">Installing (for Windows, MacOS and Linux)</h4>
|
||||
|
|
@ -63,13 +64,13 @@
|
|||
<p>You can find prebuilt binaries <a href="https://github.com/torappinfo/ebrowser/releases">here</a>.</p>
|
||||
<h5 id="install-ebrowser-and-electron-separatedly">Install ebrowser and electron separatedly</h5>
|
||||
<h6 id="install-ebrowser">Install ebrowser</h6>
|
||||
<p>Either download and unzip ebrowser package directly from any of npm mirror sites like <a href="https://npmmirror.com/package/ebrowser">npmmirror</a> or with nodejs by</p>
|
||||
<p>Either download (Click the green "Code" button above the file list => Select "Download ZIP") and unzip from</p>
|
||||
<pre><code>https://github.com/torappinfo/ebrowser
|
||||
</code></pre>
|
||||
<p>OR download and unzip ebrowser package directly from any of npm mirror sites like <a href="https://npmmirror.com/package/ebrowser">npmmirror</a> or with nodejs by</p>
|
||||
<pre><code>npm install ebrowser
|
||||
</code></pre>
|
||||
<p>OR</p>
|
||||
<pre><code>git clone https://github.com/torappinfo/ebrowser
|
||||
</code></pre>
|
||||
<p>OR "git clone"/download files directly from any of <a href="https://gitlab.com/jamesfengcao/uweb/-/blob/master/en/mirrors.md">mirror repositories</a> and ebrowser is under the folder "misc/ebrowser".</p>
|
||||
<p>OR download/"git clone" files directly from any of <a href="https://gitlab.com/jamesfengcao/uweb/-/blob/master/en/mirrors.md">mirror repositories</a> and ebrowser is under the folder "misc/ebrowser".</p>
|
||||
<h6 id="install-electron">Install electron</h6>
|
||||
<p>Before you can run ebrowser, you need to install electron either with nodejs by</p>
|
||||
<pre><code>npm install electron
|
||||
|
|
@ -222,8 +223,8 @@
|
|||
<p>You can copy or modify the code/program under the terms of the GPL3.0 or later versions.</p>
|
||||
|
||||
</div>
|
||||
<p>Last Modified: 8 December 2024<br>
|
||||
update AI engines<br>
|
||||
<p>Last Modified: 2 May 2025<br>
|
||||
update ebrowser readme<br>
|
||||
<pre></pre>
|
||||
</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="Hugo 0.145.0">
|
||||
<meta name="generator" content="Hugo 0.146.7">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="canonical" href="https://jamesfengcao.gitlab.io/uweb/en/" />
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,7 +1,6 @@
|
|||
<style>a+br{display:none;}</style>
|
||||
#### Mirrors (for version 1040+)
|
||||
[gitee](https://gitee.com/jamesfengcao/uweb/raw/master/redirect.html#)
|
||||
[gitcode](https://raw.gitcode.com/uweb/uweb/raw/master/redirect.html#)
|
||||
[gitea](https://gitea.com/torappinfo/uweb/raw/branch/master/redirect.html#)
|
||||
[notabug](https://notabug.org/torappinfo/uweb/raw/master/redirect.html#)
|
||||
[launchpad](https://git.launchpad.net/uweb/plain/redirect.html#)
|
||||
|
|
@ -23,7 +22,6 @@
|
|||
#### Mirrors (for all versions)
|
||||
<p>
|
||||
<a href="i:0mi:5h:https://gitee.com/jamesfengcao/uweb/raw/master/redirect.html">1</a>
|
||||
<a href="i:0m?:https://raw.gitcode.com/uweb/uweb/raw/master/redirect.html">4</a>
|
||||
<a href="i:0m?:https://gitea.com/torappinfo/uweb/raw/branch/master/redirect.html">5</a>
|
||||
<a href="i:0mi:5h?format=raw::https://sourceforge.net/p/uwebbrowser/code/ci/master/tree/redirect.html">6</a>
|
||||
<a href="i:0mi:5h?format=raw::https://rocketgit.com/user/torappinfo/uweb/source/tree/branch/master/blob_download/redirect.html">7</a>
|
||||
|
|
@ -52,7 +50,6 @@
|
|||
[bitbucket](https://bitbucket.org/torappinfo/torappinfo.bitbucket.io)
|
||||
[codeberg](https://codeberg.org/jamesfengcao/pages/src/branch/master/README.md)
|
||||
[gitee](https://gitee.com/jamesfengcao/uweb)
|
||||
[gitcode](https://gitcode.com/uweb/uweb)
|
||||
[atomgit](https://atomgit.com/jamesfengcao/uweb)
|
||||
[gitlink](https://www.gitlink.org.cn/jamesfengcao/uweb)
|
||||
[gitgud](https://gitgud.io/jamesfengcao/uweb)
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@
|
|||
<style>a+br{display:none;}</style>
|
||||
<h4 id="mirrors-for-version-1040">Mirrors (for version 1040+)</h4>
|
||||
<p><a href="https://gitee.com/jamesfengcao/uweb/raw/master/redirect.html#">gitee</a><br>
|
||||
<a href="https://raw.gitcode.com/uweb/uweb/raw/master/redirect.html#">gitcode</a><br>
|
||||
<a href="https://gitea.com/torappinfo/uweb/raw/branch/master/redirect.html#">gitea</a><br>
|
||||
<a href="https://notabug.org/torappinfo/uweb/raw/master/redirect.html#">notabug</a><br>
|
||||
<a href="https://git.launchpad.net/uweb/plain/redirect.html#">launchpad</a><br>
|
||||
|
|
@ -68,7 +67,6 @@
|
|||
<h4 id="mirrors-for-all-versions">Mirrors (for all versions)</h4>
|
||||
<p>
|
||||
<a href="i:0mi:5h:https://gitee.com/jamesfengcao/uweb/raw/master/redirect.html">1</a>
|
||||
<a href="i:0m?:https://raw.gitcode.com/uweb/uweb/raw/master/redirect.html">4</a>
|
||||
<a href="i:0m?:https://gitea.com/torappinfo/uweb/raw/branch/master/redirect.html">5</a>
|
||||
<a href="i:0mi:5h?format=raw::https://sourceforge.net/p/uwebbrowser/code/ci/master/tree/redirect.html">6</a>
|
||||
<a href="i:0mi:5h?format=raw::https://rocketgit.com/user/torappinfo/uweb/source/tree/branch/master/blob_download/redirect.html">7</a>
|
||||
|
|
@ -96,7 +94,6 @@
|
|||
<a href="https://bitbucket.org/torappinfo/torappinfo.bitbucket.io">bitbucket</a><br>
|
||||
<a href="https://codeberg.org/jamesfengcao/pages/src/branch/master/README.md">codeberg</a><br>
|
||||
<a href="https://gitee.com/jamesfengcao/uweb">gitee</a><br>
|
||||
<a href="https://gitcode.com/uweb/uweb">gitcode</a><br>
|
||||
<a href="https://atomgit.com/jamesfengcao/uweb">atomgit</a><br>
|
||||
<a href="https://www.gitlink.org.cn/jamesfengcao/uweb">gitlink</a><br>
|
||||
<a href="https://gitgud.io/jamesfengcao/uweb">gitgud</a><br>
|
||||
|
|
@ -113,8 +110,8 @@
|
|||
<a href="https://code.antopie.org/jamesfengcao/uweb/src/master/README.md">antopie</a></p>
|
||||
|
||||
</div>
|
||||
<p>Last Modified: 8 January 2025<br>
|
||||
update AI engines<br>
|
||||
<p>Last Modified: 12 April 2025<br>
|
||||
update ebrowser readme<br>
|
||||
<pre></pre>
|
||||
</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -44,8 +44,6 @@ Clicking the following search engine configuration links (or append the link tex
|
|||
|
||||
<a href="i:00lenso:https://lenso.ai/en/search-by-text?type=relatedText&desc=">lenso:https://lenso.ai/en/search-by-text?type=relatedText&desc=</a>
|
||||
|
||||
<a href="i:00thinkany:https://thinkany.so/search?q=">thinkany:https://thinkany.so/search?q=</a>
|
||||
|
||||
<a href="i:00phind:https://phind-ai.com/search?q=">phind:https://phind-ai.com/search?q=</a>
|
||||
|
||||
<a href="i:00xanswer:https://www.xanswer.com/search?q=">xanswer:https://www.xanswer.com/search?q=</a>
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@
|
|||
<p><a href="i:00gigabrain:https://thegigabrain.com/search/">gigabrain:https://thegigabrain.com/search/</a></p>
|
||||
<p><a href="i:00liner:https://getliner.com?q=">liner:https://getliner.com?q=</a></p>
|
||||
<p><a href="i:00lenso:https://lenso.ai/en/search-by-text?type=relatedText&desc=">lenso:https://lenso.ai/en/search-by-text?type=relatedText&desc=</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:00xanswer:https://www.xanswer.com/search?q=">xanswer:https://www.xanswer.com/search?q=</a></p>
|
||||
<p><a href="i:00mistral:https://chat.mistral.ai/chat?q=">mistral:https://chat.mistral.ai/chat?q=</a></p>
|
||||
|
|
@ -282,7 +281,7 @@
|
|||
<a href="https://alternativeto.net/software/google-search/?feature=web-search">alternativeto</a></p>
|
||||
|
||||
</div>
|
||||
<p>Last Modified: 8 April 2025<br>
|
||||
<p>Last Modified: 11 April 2025<br>
|
||||
add notes for '%250D'<br>
|
||||
<pre>Add AI engines
|
||||
</pre>
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
/>
|
||||
</url><url>
|
||||
<loc>https://jamesfengcao.gitlab.io/uweb/en/</loc>
|
||||
<lastmod>2025-04-09T00:54:18+08:00</lastmod>
|
||||
<lastmod>2025-05-02T12:04:53+08:00</lastmod>
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="zh"
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
<lastmod>2025-04-07T22:07:29+08:00</lastmod>
|
||||
</url><url>
|
||||
<loc>https://jamesfengcao.gitlab.io/uweb/en/search/</loc>
|
||||
<lastmod>2025-04-08T23:08:09+08:00</lastmod>
|
||||
<lastmod>2025-04-11T08:35:03+08:00</lastmod>
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="zh"
|
||||
|
|
@ -97,7 +97,7 @@
|
|||
/>
|
||||
</url><url>
|
||||
<loc>https://jamesfengcao.gitlab.io/uweb/en/topposts/</loc>
|
||||
<lastmod>2025-04-09T00:47:06+08:00</lastmod>
|
||||
<lastmod>2025-04-11T08:35:03+08:00</lastmod>
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="zh"
|
||||
|
|
@ -530,10 +530,10 @@
|
|||
/>
|
||||
</url><url>
|
||||
<loc>https://jamesfengcao.gitlab.io/uweb/en/ebrowserreadme/</loc>
|
||||
<lastmod>2024-12-08T16:34:57+08:00</lastmod>
|
||||
<lastmod>2025-05-02T12:04:53+08:00</lastmod>
|
||||
</url><url>
|
||||
<loc>https://jamesfengcao.gitlab.io/uweb/en/mirrors/</loc>
|
||||
<lastmod>2025-01-08T22:49:43+08:00</lastmod>
|
||||
<lastmod>2025-04-12T07:42:28+08:00</lastmod>
|
||||
</url><url>
|
||||
<loc>https://jamesfengcao.gitlab.io/uweb/en/readme/</loc>
|
||||
<lastmod>2025-03-15T20:17:21+08:00</lastmod>
|
||||
|
|
@ -561,7 +561,7 @@
|
|||
/>
|
||||
</url><url>
|
||||
<loc>https://jamesfengcao.gitlab.io/uweb/en/unlist/</loc>
|
||||
<lastmod>2025-03-15T20:17:21+08:00</lastmod>
|
||||
<lastmod>2025-05-02T12:04:53+08:00</lastmod>
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="zh"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<description>Recent content in Topposts on uweb browser: unlimited power</description>
|
||||
<generator>Hugo</generator>
|
||||
<language>en</language>
|
||||
<lastBuildDate>Wed, 09 Apr 2025 00:47:06 +0800</lastBuildDate>
|
||||
<lastBuildDate>Fri, 11 Apr 2025 08:35:03 +0800</lastBuildDate>
|
||||
<atom:link href="https://jamesfengcao.gitlab.io/uweb/en/topposts/index.xml" rel="self" type="application/rss+xml" />
|
||||
<item>
|
||||
<title>Search engine query URLs</title>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,7 +1,7 @@
|
|||
<script>var verCode = %1%;</script>
|
||||
<script>
|
||||
(function(){
|
||||
let latestV = 1121;
|
||||
let latestV = 1122;
|
||||
let msg = "Already up to date!";
|
||||
let url="https://master.dl.sourceforge.net/project/uwebbrowser/v1/uweb"+latestV+".apk?viasf=1";
|
||||
do {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ Ebrowser is designed with the philosophy of [Android uweb browser](https://githu
|
|||
- 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.
|
||||
- dark theme support.
|
||||
|
||||
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.
|
||||
|
||||
|
|
@ -18,15 +19,15 @@ You can find prebuilt binaries [here](https://github.com/torappinfo/ebrowser/rel
|
|||
|
||||
##### Install ebrowser and electron separatedly
|
||||
###### Install ebrowser
|
||||
Either download and unzip ebrowser package directly from any of npm mirror sites like [npmmirror](https://npmmirror.com/package/ebrowser) or with nodejs by
|
||||
Either download (Click the green "Code" button above the file list => Select "Download ZIP") and unzip from
|
||||
|
||||
https://github.com/torappinfo/ebrowser
|
||||
|
||||
OR download and unzip ebrowser package directly from any of npm mirror sites like [npmmirror](https://npmmirror.com/package/ebrowser) or with nodejs by
|
||||
|
||||
npm install ebrowser
|
||||
|
||||
OR
|
||||
|
||||
git clone https://github.com/torappinfo/ebrowser
|
||||
|
||||
OR "git clone"/download files directly from any of [mirror repositories](https://gitlab.com/jamesfengcao/uweb/-/blob/master/en/mirrors.md) and ebrowser is under the folder "misc/ebrowser".
|
||||
OR download/"git clone" files directly from any of [mirror repositories](https://gitlab.com/jamesfengcao/uweb/-/blob/master/en/mirrors.md) and ebrowser is under the folder "misc/ebrowser".
|
||||
|
||||
###### Install electron
|
||||
Before you can run ebrowser, you need to install electron either with nodejs by
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ You should have received a copy of the GNU General Public License along with thi
|
|||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const readline = require('readline');
|
||||
const cssInvert = "html,img,video{filter:invert(1) hue-rotate(180deg) !important;}body{background:white !important;}img[src],input[type=image]{opacity:.9;}";
|
||||
var iTab = 0;
|
||||
var tabs;
|
||||
var engines = {};
|
||||
|
|
@ -70,6 +71,8 @@ You should have received a copy of the GNU General Public License along with thi
|
|||
var historyFile = path.join(__dirname,'history.rec');
|
||||
var bHistory = false;
|
||||
var bQueryHistory = false;
|
||||
const currentHour = new Date().getHours();
|
||||
var bDarkTheme = (currentHour >= 17 || currentHour < 8);
|
||||
let sitecssP = path.join(__dirname,"sitecss");
|
||||
let sitejsP = path.join(__dirname,"sitejs");
|
||||
let gjsA = [];
|
||||
|
|
@ -156,12 +159,13 @@ You should have received a copy of the GNU General Public License along with thi
|
|||
async function loadCSSFile(tab,jsF){
|
||||
try {
|
||||
let js = await fs.promises.readFile(jsF,'utf8');
|
||||
tab.insertCSS(css);
|
||||
tab.insertCSS(js);
|
||||
}catch(e){}
|
||||
}
|
||||
function cbStartLoading(e){
|
||||
if(!bDomainCSS) return;
|
||||
let tab = e.target;
|
||||
if(bDarkTheme) tab.insertCSS(cssInvert);
|
||||
if(!bDomainCSS) return;
|
||||
let domain;
|
||||
try{
|
||||
domain = new URL(tab.getURL()).hostname;
|
||||
|
|
@ -214,7 +218,7 @@ You should have received a copy of the GNU General Public License along with thi
|
|||
function initTab(tab){
|
||||
tab.allowpopups = true;
|
||||
tab.addEventListener('did-finish-load',cbFinishLoad);
|
||||
tab.addEventListener('did-start-loading',cbStartLoading);
|
||||
tab.addEventListener('dom-ready',cbStartLoading);
|
||||
tab.addEventListener('will-navigate',cbNavigate);
|
||||
}
|
||||
function newTab(){
|
||||
|
|
@ -532,7 +536,7 @@ You should have received a copy of the GNU General Public License along with thi
|
|||
break;
|
||||
}
|
||||
if(q.indexOf('.')>0){
|
||||
url = 'https://'+q;
|
||||
url = 'http://'+q;
|
||||
break NOREC;
|
||||
}
|
||||
url = defaultSE.replace('%s',q);
|
||||
|
|
@ -835,7 +839,7 @@ function autocomplete(inp,container,arr) {
|
|||
<div class="autocomplete-items"></div>
|
||||
</form>
|
||||
<div class="webviews">
|
||||
<webview class="curWV" allowpopups></webview>
|
||||
<webview class="curWV" src="about:blank" allowpopups></webview>
|
||||
</div>
|
||||
<script>
|
||||
tabs = document.body.children[1];
|
||||
|
|
|
|||
|
|
@ -6,5 +6,6 @@
|
|||
"np":":np",
|
||||
"uh":":bjs bHistory=bQueryHistory=true //record/Use history",
|
||||
"nh":":bjs bHistory=bQueryHistory=false //No history",
|
||||
"md":":bjs tabJS(BML_md) //markdown preview"
|
||||
"md":":bjs tabJS(BML_md) //markdown preview",
|
||||
"td":":bjs bDarkTheme = !bDarkTheme;if(bDarkTheme) tabs.children[iTab].insertCSS(cssInvert);else tabs.children[iTab].reload()"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{"version":"1.0.65",
|
||||
{"version":"1.0.69",
|
||||
"name": "ebrowser",
|
||||
"description": "The keyboard-friendly minimal suckless web browser",
|
||||
"main": "webview.js",
|
||||
|
|
@ -8,7 +8,8 @@
|
|||
"package.json",
|
||||
"README.md",
|
||||
"translate.*",
|
||||
"js/*.js"
|
||||
"js/*.js",
|
||||
"mapkeys.json"
|
||||
],
|
||||
"scripts": {
|
||||
"release": "electron-builder"
|
||||
|
|
|
|||
|
|
@ -11,9 +11,8 @@
|
|||
"ms":"https://metaso.cn?q=%s",
|
||||
"lf":"i:0/js/uwebset.js:https://chat.lify.vip/chat?uweb=%s",
|
||||
"gc":"i:0/js/uweb2ta.js:https://gitcode.com/ai/#uweb=%s",
|
||||
"ds":"i:0/js/uweb2ta.js:https://metaso.cn/#uweb=%s",
|
||||
"ds":"i:0/js/uweb2ta.js:https://metaso.cn/?uweb=%s%0D",
|
||||
"df":"https://www.deepfind.co/?q=%s",
|
||||
"ta":"https://thinkany.so/search?q=%s",
|
||||
"mo":"https://monica.im/home/chat/deepseek-r1/deepseek_reasoner?q=%s",
|
||||
"yw":"i:0/js/uwebset.js:https://yuewen.cn/chats/new?uweb=%s",
|
||||
"zd":"https://zhida.zhihu.com/?q=%s",
|
||||
|
|
|
|||
|
|
@ -95,13 +95,16 @@ async function createWindow () {
|
|||
})();
|
||||
|
||||
win = new BrowserWindow(
|
||||
{width: 800, height: 600,autoHideMenuBar: true,
|
||||
{maximized: true,show: false, autoHideMenuBar: true,
|
||||
webPreferences: {
|
||||
nodeIntegration: true,
|
||||
contextIsolation: false,
|
||||
webviewTag: true,
|
||||
}});
|
||||
win.setMenuBarVisibility(false);
|
||||
win.once('ready-to-show', () => {
|
||||
win.show();
|
||||
});
|
||||
win.on('closed', function () {
|
||||
win = null
|
||||
})
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<sitemap>
|
||||
<loc>https://jamesfengcao.gitlab.io/uweb/en/sitemap.xml</loc>
|
||||
|
||||
<lastmod>2025-04-09T00:54:18+08:00</lastmod>
|
||||
<lastmod>2025-05-02T12:04:53+08:00</lastmod>
|
||||
|
||||
</sitemap>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="Hugo 0.145.0">
|
||||
<meta name="generator" content="Hugo 0.146.7">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="canonical" href="https://jamesfengcao.gitlab.io/uweb/zh/" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue