mirror of
https://github.com/torappinfo/uweb.git
synced 2024-08-14 23:54:59 +00:00
Compare commits
2 commits
e29bf0538d
...
2e2b048336
Author | SHA1 | Date | |
---|---|---|---|
|
2e2b048336 | ||
|
17932d8843 |
7 changed files with 34 additions and 11 deletions
|
@ -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 installed
|
##### Install with nodejs
|
||||||
|
|
||||||
npm install electron
|
npm install electron
|
||||||
npm install ebrowser
|
npm install ebrowser
|
||||||
|
|
|
@ -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-installed">Install with nodejs installed</h5>
|
<h5 id="install-with-nodejs">Install with nodejs</h5>
|
||||||
<pre><code>npm install electron
|
<pre><code>npm install electron
|
||||||
npm install ebrowser
|
npm install ebrowser
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
|
@ -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 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" />
|
<atom:link href="/en/index.xml" rel="self" type="application/rss+xml" />
|
||||||
<item>
|
<item>
|
||||||
<title>Text selection/processing</title>
|
<title>Text selection/processing</title>
|
||||||
|
|
|
@ -71,7 +71,7 @@
|
||||||
/>
|
/>
|
||||||
</url><url>
|
</url><url>
|
||||||
<loc>/en/</loc>
|
<loc>/en/</loc>
|
||||||
<lastmod>2024-06-19T06:57:59+08:00</lastmod>
|
<lastmod>2024-06-19T09:41:18+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-19T06:57:59+08:00</lastmod>
|
<lastmod>2024-06-19T09:41:18+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-19T06:57:59+08:00</lastmod>
|
<lastmod>2024-06-19T09:41:18+08:00</lastmod>
|
||||||
<xhtml:link
|
<xhtml:link
|
||||||
rel="alternate"
|
rel="alternate"
|
||||||
hreflang="zh"
|
hreflang="zh"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{"version":"1.0.24",
|
{"version":"1.0.27",
|
||||||
"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",
|
||||||
|
|
|
@ -358,6 +358,14 @@ 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: [
|
||||||
|
@ -365,8 +373,7 @@ function topMenu(){
|
||||||
addrCommand(":update");
|
addrCommand(":update");
|
||||||
}},
|
}},
|
||||||
{ label: 'Help', accelerator: 'F1', click: ()=>{
|
{ label: 'Help', accelerator: 'F1', click: ()=>{
|
||||||
let js="tabs.children[iTab].src='file://'+__dirname+'/README.md'";
|
help();
|
||||||
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()"
|
||||||
|
@ -534,7 +541,7 @@ async function updateApp(url){//url must ending with "/"
|
||||||
msg = "remote package.json corrupted"
|
msg = "remote package.json corrupted"
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
iV = iV + 11;
|
iV = iV + 10;
|
||||||
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));
|
||||||
|
@ -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)
|
||||||
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<sitemap>
|
<sitemap>
|
||||||
<loc>/en/sitemap.xml</loc>
|
<loc>/en/sitemap.xml</loc>
|
||||||
|
|
||||||
<lastmod>2024-06-19T06:57:59+08:00</lastmod>
|
<lastmod>2024-06-19T09:41:18+08:00</lastmod>
|
||||||
|
|
||||||
</sitemap>
|
</sitemap>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue