Compare commits

..

2 commits

Author SHA1 Message Date
James Feng Cao
2e2b048336 ebrowser 1.0.27 2024-06-19 15:48:13 +08:00
James Feng Cao
17932d8843 ebrowser 1.0.26 2024-06-19 15:25:23 +08:00
7 changed files with 34 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.27",
"name": "ebrowser",
"description": "The keyboard-friendly minimal suckless web browser",
"main": "webview.js",

View file

@ -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: [
@ -365,8 +373,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 +541,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 +594,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>