mirror of
https://github.com/torappinfo/uweb.git
synced 2024-08-14 23:54:59 +00:00
ebrowser v1.0.23
This commit is contained in:
parent
070d64e7e2
commit
7990d17849
7 changed files with 40 additions and 23 deletions
|
@ -25,6 +25,13 @@ Run ebrowser
|
||||||
|
|
||||||
Later on, you can run "npm install electron" to update electron/chromium or "npm install ebrowser" to update ebrowser independently.
|
Later on, you can run "npm install electron" to update electron/chromium or "npm install ebrowser" to update ebrowser independently.
|
||||||
|
|
||||||
|
##### 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.
|
||||||
|
|
||||||
|
Mirror urls could be used like ":update https://uwebzh.netlify.app/misc/ebrowser". All the mirrors listed in [uweb browser](https://uwebzh.netlify.app/en/readme/index.html) could be used. The update url needs to be changed accordingly to to be the folder "misc/ebrowser" under the mirror site root url.
|
||||||
|
|
||||||
#### Key shortcuts
|
#### Key shortcuts
|
||||||
- F1: Help
|
- F1: Help
|
||||||
- CTRL+C: stop loading
|
- CTRL+C: stop loading
|
||||||
|
|
|
@ -65,6 +65,10 @@ npm install ebrowser
|
||||||
<pre><code>electron ~/node_modules/ebrowser
|
<pre><code>electron ~/node_modules/ebrowser
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>Later on, you can run "npm install electron" to update electron/chromium or "npm install ebrowser" to update ebrowser independently.</p>
|
<p>Later on, you can run "npm install electron" to update electron/chromium or "npm install ebrowser" to update ebrowser independently.</p>
|
||||||
|
<h5 id="update-app-quickly-without-updating-chromium">Update app quickly without updating chromium</h5>
|
||||||
|
<p>Pressing "Alt" to show the menu bar and choose "Check for updates" under "Help". OR</p>
|
||||||
|
<p>Type ":update" in the address bar and press "enter" key to update.</p>
|
||||||
|
<p>Mirror urls could be used like ":update https://uwebzh.netlify.app/misc/ebrowser". All the mirrors listed in <a href="https://uwebzh.netlify.app/en/readme/index.html">uweb browser</a> could be used. The update url needs to be changed accordingly to to be the folder "misc/ebrowser" under the mirror site root url.</p>
|
||||||
<h4 id="key-shortcuts">Key shortcuts</h4>
|
<h4 id="key-shortcuts">Key shortcuts</h4>
|
||||||
<ul>
|
<ul>
|
||||||
<li>F1: Help</li>
|
<li>F1: Help</li>
|
||||||
|
@ -162,7 +166,7 @@ npm install ebrowser
|
||||||
<p>You can copy or modify the code/program under the terms of the GPL3.0 or later versions.</p>
|
<p>You can copy or modify the code/program under the terms of the GPL3.0 or later versions.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<p>Last Modified: 18 June 2024<br>
|
<p>Last Modified: 19 June 2024<br>
|
||||||
<br>
|
<br>
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<description>Recent content on uweb browser: unlimited power</description>
|
<description>Recent content on uweb browser: unlimited power</description>
|
||||||
<generator>Hugo</generator>
|
<generator>Hugo</generator>
|
||||||
<language>en</language>
|
<language>en</language>
|
||||||
<lastBuildDate>Tue, 18 Jun 2024 23:24:23 +0800</lastBuildDate>
|
<lastBuildDate>Wed, 19 Jun 2024 06:32:19 +0800</lastBuildDate>
|
||||||
<atom:link href="/en/index.xml" rel="self" type="application/rss+xml" />
|
<atom:link href="/en/index.xml" rel="self" type="application/rss+xml" />
|
||||||
<item>
|
<item>
|
||||||
<title>Text selection/processing</title>
|
<title>Text selection/processing</title>
|
||||||
|
|
|
@ -71,7 +71,7 @@
|
||||||
/>
|
/>
|
||||||
</url><url>
|
</url><url>
|
||||||
<loc>/en/</loc>
|
<loc>/en/</loc>
|
||||||
<lastmod>2024-06-18T23:24:23+08:00</lastmod>
|
<lastmod>2024-06-19T06:32:19+08:00</lastmod>
|
||||||
<xhtml:link
|
<xhtml:link
|
||||||
rel="alternate"
|
rel="alternate"
|
||||||
hreflang="zh"
|
hreflang="zh"
|
||||||
|
@ -508,7 +508,7 @@
|
||||||
/>
|
/>
|
||||||
</url><url>
|
</url><url>
|
||||||
<loc>/en/ebrowserreadme/</loc>
|
<loc>/en/ebrowserreadme/</loc>
|
||||||
<lastmod>2024-06-18T23:24:23+08:00</lastmod>
|
<lastmod>2024-06-19T06:32:19+08:00</lastmod>
|
||||||
</url><url>
|
</url><url>
|
||||||
<loc>/en/mirrors/</loc>
|
<loc>/en/mirrors/</loc>
|
||||||
<lastmod>2024-06-18T23:17:17+08:00</lastmod>
|
<lastmod>2024-06-18T23:17:17+08:00</lastmod>
|
||||||
|
@ -539,7 +539,7 @@
|
||||||
/>
|
/>
|
||||||
</url><url>
|
</url><url>
|
||||||
<loc>/en/unlist/</loc>
|
<loc>/en/unlist/</loc>
|
||||||
<lastmod>2024-06-18T23:24:23+08:00</lastmod>
|
<lastmod>2024-06-19T06:32:19+08:00</lastmod>
|
||||||
<xhtml:link
|
<xhtml:link
|
||||||
rel="alternate"
|
rel="alternate"
|
||||||
hreflang="zh"
|
hreflang="zh"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{"version":"1.0.21",
|
{"version":"1.0.23",
|
||||||
"name": "ebrowser",
|
"name": "ebrowser",
|
||||||
"description": "The keyboard-friendly minimal suckless web browser",
|
"description": "The keyboard-friendly minimal suckless web browser",
|
||||||
"main": "webview.js",
|
"main": "webview.js",
|
||||||
|
|
|
@ -359,8 +359,11 @@ function onContextMenu(event, params){
|
||||||
function topMenu(){
|
function topMenu(){
|
||||||
const menuTemplate = [
|
const menuTemplate = [
|
||||||
{
|
{
|
||||||
label: '',
|
label: '&Help',
|
||||||
submenu: [
|
submenu: [
|
||||||
|
{ label: 'Check for updates', click: ()=>{
|
||||||
|
addrCommand(":update");
|
||||||
|
}},
|
||||||
{ label: 'Help', accelerator: 'F1', click: ()=>{
|
{ label: 'Help', accelerator: 'F1', click: ()=>{
|
||||||
let js="tabs.children[iTab].src='file://'+__dirname+'/README.md'";
|
let js="tabs.children[iTab].src='file://'+__dirname+'/README.md'";
|
||||||
win.webContents.executeJavaScript(js,false)
|
win.webContents.executeJavaScript(js,false)
|
||||||
|
@ -524,9 +527,7 @@ async function updateApp(url){//url must ending with "/"
|
||||||
try {
|
try {
|
||||||
let res = await fetch(url+"package.json");
|
let res = await fetch(url+"package.json");
|
||||||
let packageS = await res.text();
|
let packageS = await res.text();
|
||||||
let nLatestVer;
|
{//the last part of version string is the version number, must keep increasing
|
||||||
//the last part of version string is the version number, must keep increasing
|
|
||||||
{
|
|
||||||
let head = packageS.slice(2,40);
|
let head = packageS.slice(2,40);
|
||||||
let iV = head.indexOf("version");
|
let iV = head.indexOf("version");
|
||||||
if(iV<0) {
|
if(iV<0) {
|
||||||
|
@ -536,23 +537,28 @@ async function updateApp(url){//url must ending with "/"
|
||||||
iV = iV + 11;
|
iV = iV + 11;
|
||||||
let iE = head.indexOf('"',iV+4);
|
let iE = head.indexOf('"',iV+4);
|
||||||
let iS = head.lastIndexOf('.',iE-1);
|
let iS = head.lastIndexOf('.',iE-1);
|
||||||
nLatestVer = parseInt(head.substring(iS+1,iE));
|
let nLatestVer = parseInt(head.substring(iS+1,iE));
|
||||||
}
|
|
||||||
let nVer;
|
|
||||||
{
|
|
||||||
let ver = app.getVersion();
|
let ver = app.getVersion();
|
||||||
let iS = ver.lastIndexOf('.');
|
iS = ver.lastIndexOf('.');
|
||||||
nVer = parseInt(ver.substring(iS+1));
|
let nVer = parseInt(ver.substring(iS+1));
|
||||||
}
|
|
||||||
if(nVer>=nLatestVer){
|
if(nVer>=nLatestVer){
|
||||||
msg = "Already up to date";
|
msg = `Current version ${ver} is already up to date`;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
const choice = dialog.showMessageBoxSync(null, {
|
||||||
|
type: 'warning',
|
||||||
|
title: `Update from ${url}`,
|
||||||
|
message: `Proceed to update from ${ver} to ${head.substring(iV,iE)}?`,
|
||||||
|
buttons: ['YES','NO']
|
||||||
|
});
|
||||||
|
if(1===choice) return;
|
||||||
|
}
|
||||||
|
|
||||||
writeFile("package.json", packageS);
|
writeFile("package.json", packageS);
|
||||||
|
|
||||||
fetch2file(url,"webview.js");
|
fetch2file(url,"webview.js");
|
||||||
fetch2file(url,"index.html");
|
fetch2file(url,"index.html");
|
||||||
|
|
||||||
msg = "Update completed";
|
msg = "Update completed";
|
||||||
}catch(e){
|
}catch(e){
|
||||||
msg = "Fail to update"
|
msg = "Fail to update"
|
||||||
|
@ -560,7 +566,7 @@ async function updateApp(url){//url must ending with "/"
|
||||||
}while(false);
|
}while(false);
|
||||||
dialog.showMessageBoxSync(null, {
|
dialog.showMessageBoxSync(null, {
|
||||||
type: 'info',
|
type: 'info',
|
||||||
title: msg,
|
title: `Update from ${url}`,
|
||||||
message: msg,
|
message: msg,
|
||||||
buttons: ['OK']
|
buttons: ['OK']
|
||||||
})
|
})
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<sitemap>
|
<sitemap>
|
||||||
<loc>/en/sitemap.xml</loc>
|
<loc>/en/sitemap.xml</loc>
|
||||||
|
|
||||||
<lastmod>2024-06-18T23:24:23+08:00</lastmod>
|
<lastmod>2024-06-19T06:32:19+08:00</lastmod>
|
||||||
|
|
||||||
</sitemap>
|
</sitemap>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue