Skip to content

Commit ac88c1d

Browse files
Hugh Isaacs IIHugh Isaacs II
authored andcommitted
Update!
+ Added a link to the Chrome Extension in the web store to server_app.html. + Added code to open links in an external browser to server_script.js. + Added Electron Build info for Windows in package.json. + Deleted manifest.json as it doesn't belong and was for the Chrome OS app (I'll upload it in the future).
1 parent a9a5424 commit ac88c1d

4 files changed

Lines changed: 18 additions & 45 deletions

File tree

electron app/resources/datpart/manifest.json

Lines changed: 0 additions & 41 deletions
This file was deleted.

electron app/resources/datpart/package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"productName": "DatPart",
44
"description": "Load Dat's in your web browser.",
55
"homepage": "https://github.com/HughIsaacs2/DatPart",
6+
"repository": { "type" : "git", "url" : "https://github.com/HughIsaacs2/DatPart.git" },
67
"version": "0.0.1",
78
"author": "Hugh Isaacs II <hughisaacs@acrylicstyle.com>",
89
"license": "MIT",
@@ -11,5 +12,11 @@
1112
"chrome-native-messaging": "^0.2.0",
1213
"dat-node": "^3.5.4",
1314
"node-dat-archive": "^1.5.0"
14-
}
15+
},
16+
"build":{
17+
"win": {
18+
"target": "zip",
19+
"icon": "favicon.ico"
20+
}
21+
}
1522
}

electron app/resources/datpart/server_app.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<html>
22
<head>
33
<meta charset="utf-8">
4-
<title>Dat Server</title>
4+
<title>DatPart Server</title>
55
<meta content="#424242" name="theme-color" id="theme-color" />
66

77
<!--<script type="text/javascript" src="/chrome-net.js"></script>-->
@@ -21,8 +21,10 @@
2121
</head>
2222
<body>
2323
<div class="hero-unit">
24-
<h1>Other Web server</h1>
25-
<p>Serving Dat sites locally<br/><br/><a href="http://1c7639eedaf8f7533f92e7c34f5a6d2b43645347836ab5e9f2489e89d3b08306.dat_site/" target="_blank" class="button">Test site: 1c7639eedaf8f7533f92e7c34f5a6d2b43645347836ab5e9f2489e89d3b08306</a></p>
24+
<h1>DatPart server</h1>
25+
<p>Serving Dat sites locally<br/><br/><a href="http://1c7639eedaf8f7533f92e7c34f5a6d2b43645347836ab5e9f2489e89d3b08306.dat_site/" target="_blank" class="button external-link">Test site: 1c7639eedaf8f7533f92e7c34f5a6d2b43645347836ab5e9f2489e89d3b08306</a>
26+
<br/><br/>If you don't have it, <a href="https://chrome.google.com/webstore/detail/datpart-extension/hnblaajbillhajijlbaepnjglfgepdgm" target="_blank" class="external-link">get the Chrome Extension here</a>.
27+
</p>
2628
</div>
2729
<pre id="logger"></pre>
2830
<hr/>

electron app/resources/datpart/server_script.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,13 @@
1414
if (typeof process.versions['electron'] !== 'undefined') {
1515

1616
// content of index.js
17+
const {shell} = require('electron');
1718
const http = require('http');
1819
var dat = require('dat-node');
20+
21+
document.querySelectorAll("a.external-link").forEach(function (el) {
22+
el.onclick = function(){shell.openExternal(el.href);return false;};
23+
});
1924

2025
const requestHandler = (request, response) => {
2126
console.log(request.url);

0 commit comments

Comments
 (0)