From 38f5ba7e262c16abdfe7fa4f289b2468fdc50e43 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 | 27 --------------------------- js/glowingbear.js | 41 ----------------------------------------- 2 files changed, 68 deletions(-) diff --git a/index.html b/index.html index c51f8a3..5a791d9 100644 --- a/index.html +++ b/index.html @@ -191,33 +191,6 @@ chown -R username:username ~username -
- -
-
-

You don't need to install anything to use Glowing Bear, it works with any modern browser. Start using it right now at the top of the page! However, there are a few ways to improve integration with your operating system.

-

Mobile Applications

-

If you're running Android 4.4 or later, you can install our app from the Google Play Store! We can't distribute on iOS unfortunately, but if you're a developer, you can follow the sideloading instructions.

-

Android app on Google Play

-

Electron

-

Glowing Bear supports the electron shell. You'll have to build it yourself, though. Run the following commands, choosing your platform from the list in the last command:

git clone https://github.com/glowing-bear/glowing-bear
-cd glowing-bear
-npm install
-npm install electron-packager
-npm run build-electron-{windows, darwin, linux}
-

Firefox Browser

-

Firefox used to support apps, but this was removed from Firefox. There's nothing we can do about it. Sorry!

-

Chrome

-

To install Glowing Bear as an app in Chrome for Android, select Menu - Add to home screen. In the desktop version of Chrome, click Menu - More tools - Create application shortcuts.

-
-
-

diff --git a/js/glowingbear.js b/js/glowingbear.js index 370b098..bbe1c6b 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -53,23 +53,6 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', $log.debug($rootScope.$$watchersCount); }; - $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 @@ -613,30 +596,6 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', connection.attemptReconnect(bufferId, 3000); }; -//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'); };