commit e6841cc369be1d69ce3b1ea4d4a2cc6663bf7521
parent 8c8e5b7bcef1c0a7d37c9884b7080c63ec7951fe
Author: MTRNord <mtrnord1@gmail.com>
Date: Sun, 13 Mar 2016 17:23:11 +0100
First tries
Diffstat:
3 files changed, 68 insertions(+), 1 deletion(-)
diff --git a/app/.gitignore b/app/.gitignore
@@ -0,0 +1,35 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+
+# Runtime data
+pids
+*.pid
+*.seed
+
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
+
+# Coverage directory used by tools like istanbul
+coverage
+
+# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# node-waf configuration
+.lock-wscript
+
+# Compiled binary addons (http://nodejs.org/api/addons.html)
+build/Release
+build
+cache
+
+# Dependency directory
+node_modules
+
+# Optional npm cache directory
+.npm
+
+# Optional REPL history
+.node_repl_history
diff --git a/app/index.html b/app/index.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>title</title>
+ <!--<link rel="shortcut icon" href="favicon.ico" type="image/vnd.microsoft.icon">
+ <link rel="stylesheet" href="stylesheet.css" type="text/css">-->
+ </head>
+ <body>
+ <script>
+ var request = require("request")
+ var url = "http://THIS_IS_AN_SECRET_DOMAIN/vertretungsplan?" +
+ "school=Schleswig_Lornsenschule" +
+ "&v=1337"
+
+ request({
+ url: url,
+ json: true
+ }, function (error, response, body) {
+
+ if (!error && response.statusCode === 200) {
+ //var lsJson = JSON.parse(body);
+ document.all.school.innerHTML = body.schoolName; // Print the json response
+ }
+ })
+ </script>
+ <h1>Hello World!</h1>
+ <h2 id="school"></h2>
+ </body>
+</html>
diff --git a/app/package.json b/app/package.json
@@ -11,7 +11,7 @@
"window": {
"title": "NW.js demo",
"icon": "link.png",
- "toolbar": false,
+ "toolbar": true,
"frame": true,
"width": 800,
"height": 600,
@@ -21,5 +21,8 @@
},
"webkit": {
"plugin": true
+ },
+ "dependencies": {
+ "request": "^2.69.0"
}
}