Compare commits

..

No commits in common. "2e2b0483360469cab0259d91de3937a537510a56" and "e29bf0538d47908a64ad204638a9d68654aa816c" have entirely different histories.

7 changed files with 11 additions and 34 deletions

View file

@ -14,7 +14,7 @@ Note: Usually electron apps are heavyweight as they use browsers for simple thin
##### Install with prebuilt binaries ##### Install with prebuilt binaries
You can find prebuilt binaries [here](https://github.com/torappinfo/ebrowser/releases). You can find prebuilt binaries [here](https://github.com/torappinfo/ebrowser/releases).
##### Install with nodejs ##### Install with nodejs installed
npm install electron npm install electron
npm install ebrowser npm install ebrowser

View file

@ -57,7 +57,7 @@
<h4 id="installing-for-windows-macos-and-linux">Installing (for Windows, MacOS and Linux)</h4> <h4 id="installing-for-windows-macos-and-linux">Installing (for Windows, MacOS and Linux)</h4>
<h5 id="install-with-prebuilt-binaries">Install with prebuilt binaries</h5> <h5 id="install-with-prebuilt-binaries">Install with prebuilt binaries</h5>
<p>You can find prebuilt binaries <a href="https://github.com/torappinfo/ebrowser/releases">here</a>.</p> <p>You can find prebuilt binaries <a href="https://github.com/torappinfo/ebrowser/releases">here</a>.</p>
<h5 id="install-with-nodejs">Install with nodejs</h5> <h5 id="install-with-nodejs-installed">Install with nodejs installed</h5>
<pre><code>npm install electron <pre><code>npm install electron
npm install ebrowser npm install ebrowser
</code></pre> </code></pre>

View file

@ -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>Wed, 19 Jun 2024 09:41:18 +0800</lastBuildDate> <lastBuildDate>Wed, 19 Jun 2024 06:57:59 +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>

View file

@ -71,7 +71,7 @@
/> />
</url><url> </url><url>
<loc>/en/</loc> <loc>/en/</loc>
<lastmod>2024-06-19T09:41:18+08:00</lastmod> <lastmod>2024-06-19T06:57:59+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-19T09:41:18+08:00</lastmod> <lastmod>2024-06-19T06:57:59+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-19T09:41:18+08:00</lastmod> <lastmod>2024-06-19T06:57:59+08:00</lastmod>
<xhtml:link <xhtml:link
rel="alternate" rel="alternate"
hreflang="zh" hreflang="zh"

View file

@ -1,4 +1,4 @@
{"version":"1.0.27", {"version":"1.0.24",
"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",

View file

@ -358,14 +358,6 @@ function onContextMenu(event, params){
function topMenu(){ function topMenu(){
const menuTemplate = [ const menuTemplate = [
{
label: '&Edit',
submenu: [
{ label: 'Config folder', click: ()=>{
shell.openPath(__dirname);
}},
]
},
{ {
label: '&Help', label: '&Help',
submenu: [ submenu: [
@ -373,7 +365,8 @@ function topMenu(){
addrCommand(":update"); addrCommand(":update");
}}, }},
{ label: 'Help', accelerator: 'F1', click: ()=>{ { label: 'Help', accelerator: 'F1', click: ()=>{
help(); let js="tabs.children[iTab].src='file://'+__dirname+'/README.md'";
win.webContents.executeJavaScript(js,false)
}}, }},
{ label: 'Stop', accelerator: 'Ctrl+C', click: ()=>{ { label: 'Stop', accelerator: 'Ctrl+C', click: ()=>{
let js="tabs.children[iTab].stop()" let js="tabs.children[iTab].stop()"
@ -541,7 +534,7 @@ async function updateApp(url){//url must ending with "/"
msg = "remote package.json corrupted" msg = "remote package.json corrupted"
break; break;
} }
iV = iV + 10; 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);
let nLatestVer = parseInt(head.substring(iS+1,iE)); let nLatestVer = parseInt(head.substring(iS+1,iE));
@ -594,19 +587,3 @@ 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 ="<script src='https://cdn.jsdelivr.net/npm/marked@12.0.2/marked.min.js'></script><script>var d=document;var b=d.body;var t=b.textContent;t=t.slice(0,t.length-253);b.innerHTML=marked.parse(t);d.title=d.title||b.firstElementChild.innerText.trim();</script>";
fs.appendFileSync(htmlFN,postscript);
}catch(e){
htmlFN = readmeP;
}
}
let js=`tabs.children[iTab].src="file://${htmlFN}"`;
win.webContents.executeJavaScript(js,false)
}

View file

@ -4,7 +4,7 @@
<sitemap> <sitemap>
<loc>/en/sitemap.xml</loc> <loc>/en/sitemap.xml</loc>
<lastmod>2024-06-19T09:41:18+08:00</lastmod> <lastmod>2024-06-19T06:57:59+08:00</lastmod>
</sitemap> </sitemap>