From 4c4f536429b71bcc7539d083d2ae5a5f796cbd4d Mon Sep 17 00:00:00 2001 From: Robert Kaiser Date: Fri, 15 Feb 2013 02:53:00 +0100 Subject: [PATCH] initial commit of about crashes project --- LICENSE | 5 +++++ README | 12 ++++++++++++ TODO | 3 +++ index.html | 27 +++++++++++++++++++++++++++ js/aboutcrashes.js | 30 ++++++++++++++++++++++++++++++ manifest.appcache | 14 ++++++++++++++ manifest.webapp | 21 +++++++++++++++++++++ style/aboutcrashes.css | 10 ++++++++++ 8 files changed, 122 insertions(+) create mode 100644 LICENSE create mode 100644 README create mode 100644 TODO create mode 100644 index.html create mode 100644 js/aboutcrashes.js create mode 100644 manifest.appcache create mode 100644 manifest.webapp create mode 100644 style/aboutcrashes.css diff --git a/LICENSE b/LICENSE new file mode 100644 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 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 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 index 0000000..2e218ed --- /dev/null +++ b/index.html @@ -0,0 +1,27 @@ + + + + + + + + + About Crashes + + + + + +

About Crashes

+ + + +

+

+ + + diff --git a/js/aboutcrashes.js b/js/aboutcrashes.js new file mode 100644 index 0000000..720290a --- /dev/null +++ b/js/aboutcrashes.js @@ -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 index 0000000..ca30f3c --- /dev/null +++ b/manifest.appcache @@ -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 index 0000000..387ace2 --- /dev/null +++ b/manifest.webapp @@ -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 index 0000000..211414e --- /dev/null +++ b/style/aboutcrashes.css @@ -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; +} -- 2.35.3