diff --git a/ebrowser.md b/ebrowser.md index 4b8ece1..7d43624 100644 --- a/ebrowser.md +++ b/ebrowser.md @@ -25,14 +25,8 @@ Run ebrowser 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 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. - #### Key shortcuts +- F1: Help - CTRL+C: stop loading - CTRL+G: address bar to show page url - CTRL+L: focus to address bar @@ -46,7 +40,6 @@ Mirror urls could be used like ":update https://uwebzh.netlify.app/misc/ebrowser - CTRL+SHIFT+R: enable global redirection ("gredirect.json") - CTRL+R: disable global redirection - ESC: remove focus. similar to vi normal mode. -- F1: Help - F5: page refresh/reload - F12: devtools diff --git a/en/ebrowserreadme/index.html b/en/ebrowserreadme/index.html index 64ed5dc..ce9e4ae 100644 --- a/en/ebrowserreadme/index.html +++ b/en/ebrowserreadme/index.html @@ -65,12 +65,9 @@ npm install ebrowser
electron ~/node_modules/ebrowser
 

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 on uweb browser could be used. The update url needs to be changed accordingly to be the folder "misc/ebrowser" under the mirror site root url.

Key shortcuts

@@ -166,7 +162,7 @@ npm install ebrowser

You can copy or modify the code/program under the terms of the GPL3.0 or later versions.

-

Last Modified: 19 June 2024
+

Last Modified: 18 June 2024


 

diff --git a/en/index.xml b/en/index.xml index e76dc69..622efc5 100644 --- a/en/index.xml +++ b/en/index.xml @@ -6,7 +6,7 @@ Recent content on uweb browser: unlimited power Hugo en - Wed, 19 Jun 2024 06:57:59 +0800 + Tue, 18 Jun 2024 23:24:23 +0800 Text selection/processing diff --git a/en/sitemap.xml b/en/sitemap.xml index ab321b5..6b44d0c 100644 --- a/en/sitemap.xml +++ b/en/sitemap.xml @@ -71,7 +71,7 @@ /> /en/ - 2024-06-19T06:57:59+08:00 + 2024-06-18T23:24:23+08:00 /en/ebrowserreadme/ - 2024-06-19T06:57:59+08:00 + 2024-06-18T23:24:23+08:00 /en/mirrors/ 2024-06-18T23:17:17+08:00 @@ -539,7 +539,7 @@ /> /en/unlist/ - 2024-06-19T06:57:59+08:00 + 2024-06-18T23:24:23+08:00 { - addrCommand(":update"); - }}, { label: 'Help', accelerator: 'F1', click: ()=>{ let js="tabs.children[iTab].src='file://'+__dirname+'/README.md'"; win.webContents.executeJavaScript(js,false) @@ -527,7 +524,9 @@ async function updateApp(url){//url must ending with "/" try { let res = await fetch(url+"package.json"); let packageS = await res.text(); - {//the last part of version string is the version number, must keep increasing + let nLatestVer; + //the last part of version string is the version number, must keep increasing + { let head = packageS.slice(2,40); let iV = head.indexOf("version"); if(iV<0) { @@ -537,28 +536,23 @@ async function updateApp(url){//url must ending with "/" iV = iV + 11; let iE = head.indexOf('"',iV+4); let iS = head.lastIndexOf('.',iE-1); - let nLatestVer = parseInt(head.substring(iS+1,iE)); - - let ver = app.getVersion(); - iS = ver.lastIndexOf('.'); - let nVer = parseInt(ver.substring(iS+1)); - if(nVer>=nLatestVer){ - msg = `Current version ${ver} is already up to date`; - 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; + nLatestVer = parseInt(head.substring(iS+1,iE)); + } + let nVer; + { + let ver = app.getVersion(); + let iS = ver.lastIndexOf('.'); + nVer = parseInt(ver.substring(iS+1)); + } + if(nVer>=nLatestVer){ + msg = "Already up to date"; + break; } - writeFile("package.json", packageS); fetch2file(url,"webview.js"); fetch2file(url,"index.html"); + msg = "Update completed"; }catch(e){ msg = "Fail to update" @@ -566,7 +560,7 @@ async function updateApp(url){//url must ending with "/" }while(false); dialog.showMessageBoxSync(null, { type: 'info', - title: `Update from ${url}`, + title: msg, message: msg, buttons: ['OK'] }) diff --git a/sitemap.xml b/sitemap.xml index 77dccce..e357888 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -4,7 +4,7 @@ /en/sitemap.xml - 2024-06-19T06:57:59+08:00 + 2024-06-18T23:24:23+08:00