From 17932d8843d7b1c99fc64c777fd7f06f3e6ec150 Mon Sep 17 00:00:00 2001 From: James Feng Cao Date: Wed, 19 Jun 2024 15:25:23 +0800 Subject: [PATCH 1/2] ebrowser 1.0.26 --- ebrowser.md | 2 +- en/ebrowserreadme/index.html | 2 +- en/index.xml | 2 +- en/sitemap.xml | 6 +++--- misc/ebrowser/package.json | 2 +- misc/ebrowser/webview.js | 21 ++++++++++++++++++--- sitemap.xml | 2 +- 7 files changed, 26 insertions(+), 11 deletions(-) diff --git a/ebrowser.md b/ebrowser.md index 4b8ece1..b09f418 100644 --- a/ebrowser.md +++ b/ebrowser.md @@ -14,7 +14,7 @@ Note: Usually electron apps are heavyweight as they use browsers for simple thin ##### Install with prebuilt binaries You can find prebuilt binaries [here](https://github.com/torappinfo/ebrowser/releases). -##### Install with nodejs installed +##### Install with nodejs npm install electron npm install ebrowser diff --git a/en/ebrowserreadme/index.html b/en/ebrowserreadme/index.html index 64ed5dc..04745b6 100644 --- a/en/ebrowserreadme/index.html +++ b/en/ebrowserreadme/index.html @@ -57,7 +57,7 @@

Installing (for Windows, MacOS and Linux)

Install with prebuilt binaries

You can find prebuilt binaries here.

-
Install with nodejs installed
+
Install with nodejs
npm install electron
 npm install ebrowser
 
diff --git a/en/index.xml b/en/index.xml index e76dc69..1bad244 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 + Wed, 19 Jun 2024 09:41:18 +0800 Text selection/processing diff --git a/en/sitemap.xml b/en/sitemap.xml index ab321b5..69d3898 100644 --- a/en/sitemap.xml +++ b/en/sitemap.xml @@ -71,7 +71,7 @@ /> /en/ - 2024-06-19T06:57:59+08:00 + 2024-06-19T09:41:18+08:00 /en/ebrowserreadme/ - 2024-06-19T06:57:59+08:00 + 2024-06-19T09:41:18+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-19T09:41:18+08:00 { - let js="tabs.children[iTab].src='file://'+__dirname+'/README.md'"; - win.webContents.executeJavaScript(js,false) + help(); }}, { label: 'Stop', accelerator: 'Ctrl+C', click: ()=>{ let js="tabs.children[iTab].stop()" @@ -534,7 +533,7 @@ async function updateApp(url){//url must ending with "/" msg = "remote package.json corrupted" break; } - iV = iV + 11; + iV = iV + 10; let iE = head.indexOf('"',iV+4); let iS = head.lastIndexOf('.',iE-1); let nLatestVer = parseInt(head.substring(iS+1,iE)); @@ -587,3 +586,19 @@ async function writeFile(filename, str){ }); }); } +function help(){ + const readme = "README.md"; + const htmlFN = path.join(__dirname,readme+".html"); + if(!fs.existsSync(htmlFN)){ + const readmeP = path.join(__dirname,readme); + try { + fs.copyFileSync(readmeP, htmlFN); + const postscript =""; + fs.appendFileSync(htmlFN,postscript); + }catch(e){ + htmlFN = readmeP; + } + } + let js=`tabs.children[iTab].src="file://${htmlFN}"`; + win.webContents.executeJavaScript(js,false) +} diff --git a/sitemap.xml b/sitemap.xml index 77dccce..dee3d52 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -4,7 +4,7 @@ /en/sitemap.xml - 2024-06-19T06:57:59+08:00 + 2024-06-19T09:41:18+08:00 From 2e2b0483360469cab0259d91de3937a537510a56 Mon Sep 17 00:00:00 2001 From: James Feng Cao Date: Wed, 19 Jun 2024 15:48:13 +0800 Subject: [PATCH 2/2] ebrowser 1.0.27 --- misc/ebrowser/package.json | 2 +- misc/ebrowser/webview.js | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/misc/ebrowser/package.json b/misc/ebrowser/package.json index 9b79fb6..88a3d0c 100644 --- a/misc/ebrowser/package.json +++ b/misc/ebrowser/package.json @@ -1,4 +1,4 @@ -{"version":"1.0.26", +{"version":"1.0.27", "name": "ebrowser", "description": "The keyboard-friendly minimal suckless web browser", "main": "webview.js", diff --git a/misc/ebrowser/webview.js b/misc/ebrowser/webview.js index e05ddb5..28bc78e 100644 --- a/misc/ebrowser/webview.js +++ b/misc/ebrowser/webview.js @@ -358,6 +358,14 @@ function onContextMenu(event, params){ function topMenu(){ const menuTemplate = [ + { + label: '&Edit', + submenu: [ + { label: 'Config folder', click: ()=>{ + shell.openPath(__dirname); + }}, + ] + }, { label: '&Help', submenu: [