initial commit of about crashes project
authorRobert Kaiser <kairo@kairo.at>
Fri, 15 Feb 2013 01:53:00 +0000 (02:53 +0100)
committerRobert Kaiser <kairo@kairo.at>
Fri, 15 Feb 2013 01:53:00 +0000 (02:53 +0100)
LICENSE [new file with mode: 0644]
README [new file with mode: 0644]
TODO [new file with mode: 0644]
index.html [new file with mode: 0644]
js/aboutcrashes.js [new file with mode: 0644]
manifest.appcache [new file with mode: 0644]
manifest.webapp [new file with mode: 0644]
style/aboutcrashes.css [new file with mode: 0644]

diff --git a/LICENSE b/LICENSE
new file mode 100644 (file)
index 0000000..802ba10
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,5 @@
+This project is subject to the terms of the Mozilla Public License, v. 2.0
+(MPL2).
+MPL2 applies per file so there is a license boilerplate in every file pointing
+to the license.
+See http://mozilla.org/MPL/2.0/.
\ No newline at end of file
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..a48df8c
--- /dev/null
+++ b/README
@@ -0,0 +1,12 @@
+This web app, intended for testers, makes crash reports submitted by a Firefox
+OS device accessible.
+
+This app is destined to be listed in the Firefox Marketplace,
+but not developed far enough yet.
+
+The main repo is http://git-public.kairo.at/?p=aboutcrashes.git;a=summary but
+it's listed on GitHub at https://github.com/KaiRo-at/aboutcrashes for
+convenience for potential contributors. See the TODO for tasks that you can help
+with.
+
+Please don't use GitHub for issue tracking but http://bugzilla.kairo.at/
diff --git a/TODO b/TODO
new file mode 100644 (file)
index 0000000..dc7d1b6
--- /dev/null
+++ b/TODO
@@ -0,0 +1,3 @@
+Tasks to complete for About Crashes:
+
+* Make it work
diff --git a/index.html b/index.html
new file mode 100644 (file)
index 0000000..2e218ed
--- /dev/null
@@ -0,0 +1,27 @@
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - License, v. 2.0. If a copy of the MPL was not distributed with this file,
+   - You can obtain one at http://mozilla.org/MPL/2.0/.  -->
+
+<!DOCTYPE html>
+<html manifest="manifest.appcache">
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+  <!-- try to get 1:1 scaling on mobile, see
+       https://developer.mozilla.org/en/Mobile/Viewport_meta_tag -->
+  <meta name="viewport" content="width=device-width, height=device-height">
+  <title>About Crashes</title>
+  <script src="js/aboutcrashes.js"></script>
+  <link rel="stylesheet" href="style/aboutcrashes.css">
+  <link rel="shortcut icon" href="style/icon32.png" type="image/png">
+</head>
+<body id="body">
+<h1>About Crashes</h1>
+
+<ul id="crashlist">
+</ul>
+
+<p id="error">
+</p>
+
+</body>
+</html>
diff --git a/js/aboutcrashes.js b/js/aboutcrashes.js
new file mode 100644 (file)
index 0000000..720290a
--- /dev/null
@@ -0,0 +1,30 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+window.onload = function() {
+  setTimeout(loadCrashes, 0);
+}
+
+function loadCrashes() {
+  if (navigator.getDeviceStorage) {
+    var storage = navigator.getDeviceStorage("apps");
+    if (storage) {
+      var getRequest = storage.get("b2g/mozilla/Crash\ Reports/submitted");
+
+      getRequest.onsuccess = function() {
+        document.getElementById("error").textContent = "got access";
+      };
+      getRequest.onerror = function() {
+        var errmsg = getRequest.error && getRequest.error.name;
+        document.getElementById("error").textContent = errmsg;
+      };
+    }
+    else {
+      document.getElementById("error").textContent = "apps storage not available";
+    }
+  }
+  else {
+    document.getElementById("error").textContent = "no device storage";
+  }
+}
diff --git a/manifest.appcache b/manifest.appcache
new file mode 100644 (file)
index 0000000..ca30f3c
--- /dev/null
@@ -0,0 +1,14 @@
+CACHE MANIFEST
+
+# 2013-02-14
+manifest.webapp
+js/aboutcrashes.js
+style/aboutcrashes.css
+style/icon16.png
+style/icon32.png
+style/icon48.png
+style/icon64.png
+style/icon128.png
+
+NETWORK:
+*
diff --git a/manifest.webapp b/manifest.webapp
new file mode 100644 (file)
index 0000000..387ace2
--- /dev/null
@@ -0,0 +1,21 @@
+{
+  "name": "About Crashes",
+  "description": "Access crash reports submitted by your Firefox OS device.",
+  "launch_path": "/index.html",
+  "permissions": {
+    "device-storage:apps": {
+      "description": "Read crash reports on the device."
+    }
+  },
+  "developer": {
+    "name": "Robert Kaiser",
+    "url": "http://www.kairo.at/"
+  },
+  "icons": {
+    "16": "/style/icon16.png",
+    "32": "/style/icon32.png",
+    "48": "/style/icon48.png",
+    "64": "/style/icon64.png",
+    "128": "/style/icon128.png"
+  }
+}
\ No newline at end of file
diff --git a/style/aboutcrashes.css b/style/aboutcrashes.css
new file mode 100644 (file)
index 0000000..211414e
--- /dev/null
@@ -0,0 +1,10 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+body {
+}
+
+h1 {
+  display: none;
+}