mirror of
https://github.com/torappinfo/uweb.git
synced 2024-08-14 23:54:59 +00:00
Compare commits
No commits in common. "2e2b0483360469cab0259d91de3937a537510a56" and "e29bf0538d47908a64ad204638a9d68654aa816c" have entirely different histories.
2e2b048336
...
e29bf0538d
7 changed files with 11 additions and 34 deletions
|
@ -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
|
||||
##### Install with nodejs installed
|
||||
|
||||
npm install electron
|
||||
npm install ebrowser
|
||||
|
|
|
@ -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">Install with nodejs</h5>
|
||||
<h5 id="install-with-nodejs-installed">Install with nodejs installed</h5>
|
||||
<pre><code>npm install electron
|
||||
npm install ebrowser
|
||||
</code></pre>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<description>Recent content on uweb browser: unlimited power</description>
|
||||
<generator>Hugo</generator>
|
||||
<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" />
|
||||
<item>
|
||||
<title>Text selection/processing</title>
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
/>
|
||||
</url><url>
|
||||
<loc>/en/</loc>
|
||||
<lastmod>2024-06-19T09:41:18+08:00</lastmod>
|
||||
<lastmod>2024-06-19T06:57:59+08:00</lastmod>
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="zh"
|
||||
|
@ -508,7 +508,7 @@
|
|||
/>
|
||||
</url><url>
|
||||
<loc>/en/ebrowserreadme/</loc>
|
||||
<lastmod>2024-06-19T09:41:18+08:00</lastmod>
|
||||
<lastmod>2024-06-19T06:57:59+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-19T09:41:18+08:00</lastmod>
|
||||
<lastmod>2024-06-19T06:57:59+08:00</lastmod>
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="zh"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{"version":"1.0.27",
|
||||
{"version":"1.0.24",
|
||||
"name": "ebrowser",
|
||||
"description": "The keyboard-friendly minimal suckless web browser",
|
||||
"main": "webview.js",
|
||||
|
|
|
@ -358,14 +358,6 @@ function onContextMenu(event, params){
|
|||
|
||||
function topMenu(){
|
||||
const menuTemplate = [
|
||||
{
|
||||
label: '&Edit',
|
||||
submenu: [
|
||||
{ label: 'Config folder', click: ()=>{
|
||||
shell.openPath(__dirname);
|
||||
}},
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '&Help',
|
||||
submenu: [
|
||||
|
@ -373,7 +365,8 @@ function topMenu(){
|
|||
addrCommand(":update");
|
||||
}},
|
||||
{ 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: ()=>{
|
||||
let js="tabs.children[iTab].stop()"
|
||||
|
@ -541,7 +534,7 @@ async function updateApp(url){//url must ending with "/"
|
|||
msg = "remote package.json corrupted"
|
||||
break;
|
||||
}
|
||||
iV = iV + 10;
|
||||
iV = iV + 11;
|
||||
let iE = head.indexOf('"',iV+4);
|
||||
let iS = head.lastIndexOf('.',iE-1);
|
||||
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)
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<sitemap>
|
||||
<loc>/en/sitemap.xml</loc>
|
||||
|
||||
<lastmod>2024-06-19T09:41:18+08:00</lastmod>
|
||||
<lastmod>2024-06-19T06:57:59+08:00</lastmod>
|
||||
|
||||
</sitemap>
|
||||
|
||||
|
|
Loading…
Reference in a new issue