From 10d2f81c75b60e01412f97dfc7d9214ddac489fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20H=C3=BCbschle-Schneider?= Date: Sun, 22 Jun 2014 13:27:03 +0100 Subject: [PATCH] Remove firefox app installation --- index.html | 19 ------------------- js/glowingbear.js | 41 ----------------------------------------- 2 files changed, 60 deletions(-) diff --git a/index.html b/index.html index 652ce51..dba2086 100644 --- a/index.html +++ b/index.html @@ -171,25 +171,6 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel -
- -
-
-

You don't need to install anything to use this app, it should work with any modern browser. Start using it right now! However, there are a few ways to improve integration with your operating system.

-

Firefox

-

If you have a recent version of Firefox you can install glowing bear as an app. Click the button to install.

- -

Chrome

-

To install glowing bear as an app in Chrome, select Menu - Add to home screen (Android) or Menu - Tools - Create Application Shortcuts (desktop version).

-
-
-

diff --git a/js/glowingbear.js b/js/glowingbear.js index 6997ad0..e040af9 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -25,23 +25,6 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', $log.debug(watchers); }; - $scope.isinstalled = (function() { - // Check for firefox & app installed - if (navigator.mozApps !== undefined) { - navigator.mozApps.getSelf().onsuccess = function _onAppReady(evt) { - var app = evt.target.result; - if (app) { - return true; - } else { - return false; - } - }; - } else { - return false; - } - }()); - - // Detect page visibility attributes (function() { // Sadly, the page visibility API still has a lot of vendor prefixes @@ -482,30 +465,6 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', connection.disconnect(); }; -//XXX this is a bit out of place here, either move up to the rest of the firefox install code or remove - $scope.install = function() { - if (navigator.mozApps !== undefined) { - // Find absolute url with trailing '/' or '/index.html' removed - var base_url = location.protocol + '//' + location.host + - location.pathname.replace(/\/(index\.html)?$/, ''); - var request = navigator.mozApps.install(base_url + '/manifest.webapp'); - request.onsuccess = function () { - $scope.isinstalled = true; - // Save the App object that is returned - var appRecord = this.result; - // Start the app. - appRecord.launch(); - alert('Installation successful!'); - }; - request.onerror = function () { - // Display the error information from the DOMError object - alert('Install failed, error: ' + this.error.name); - }; - } else { - alert('Sorry. Only supported in Firefox v26+'); - } - }; - $scope.showModal = function(elementId) { document.getElementById(elementId).setAttribute('data-state', 'visible'); };