ebrowser 1.0.26

This commit is contained in:
James Feng Cao 2024-06-19 15:25:23 +08:00
parent e29bf0538d
commit 17932d8843
7 changed files with 26 additions and 11 deletions

View File

@ -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

View File

@ -57,7 +57,7 @@
<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>
<p>You can find prebuilt binaries <a href="https://github.com/torappinfo/ebrowser/releases">here</a>.</p>
<h5 id="install-with-nodejs-installed">Install with nodejs installed</h5>
<h5 id="install-with-nodejs">Install with nodejs</h5>
<pre><code>npm install electron
npm install ebrowser
</code></pre>

View File

@ -6,7 +6,7 @@
<description>Recent content on uweb browser: unlimited power</description>
<generator>Hugo</generator>
<language>en</language>
<lastBuildDate>Wed, 19 Jun 2024 06:57:59 +0800</lastBuildDate>
<lastBuildDate>Wed, 19 Jun 2024 09:41:18 +0800</lastBuildDate>
<atom:link href="/en/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Text selection/processing</title>

View File

@ -71,7 +71,7 @@
/>
</url><url>
<loc>/en/</loc>
<lastmod>2024-06-19T06:57:59+08:00</lastmod>
<lastmod>2024-06-19T09:41:18+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
@ -508,7 +508,7 @@
/>
</url><url>
<loc>/en/ebrowserreadme/</loc>
<lastmod>2024-06-19T06:57:59+08:00</lastmod>
<lastmod>2024-06-19T09:41:18+08:00</lastmod>
</url><url>
<loc>/en/mirrors/</loc>
<lastmod>2024-06-18T23:17:17+08:00</lastmod>
@ -539,7 +539,7 @@
/>
</url><url>
<loc>/en/unlist/</loc>
<lastmod>2024-06-19T06:57:59+08:00</lastmod>
<lastmod>2024-06-19T09:41:18+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"

View File

@ -1,4 +1,4 @@
{"version":"1.0.24",
{"version":"1.0.26",
"name": "ebrowser",
"description": "The keyboard-friendly minimal suckless web browser",
"main": "webview.js",

View File

@ -365,8 +365,7 @@ function topMenu(){
addrCommand(":update");
}},
{ label: 'Help', accelerator: 'F1', click: ()=>{
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 ="<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>
<loc>/en/sitemap.xml</loc>
<lastmod>2024-06-19T06:57:59+08:00</lastmod>
<lastmod>2024-06-19T09:41:18+08:00</lastmod>
</sitemap>