Remove "Install" button

In any case, Evopdia needs access to DeviceStorage, so it needs to be
a privileged webapp. As such, it has to be signed and distributed
through an app store. If I understood correctly, it will never be
installable via un simple Install button on a web page. See
https://wiki.mozilla.org/Apps/Security#Installed_privileged_application
This commit is contained in:
mossroy 2013-06-04 10:53:45 +02:00
parent 50e62b618e
commit 3f382a572a
2 changed files with 2 additions and 25 deletions

View File

@ -31,7 +31,7 @@ License:
-->
<!-- <link rel="stylesheet" href="css/app.css"> -->
<!-- TODO : implement CSS <link rel="stylesheet" href="css/app.css"> -->
</head>
<body>
<h1>Evopedia</h1>
@ -58,8 +58,7 @@ License:
<li>In some cases, the links inside an article do not work, or do not lead to the right article</li>
<li>It is hardly usable on a device because the buttons and inputs are too small</li>
</ul>
<br />
<button id="install-btn">Install</button>
<br />
</div>
<div id="openLocalFiles" style="display: none;">
<br /> Please select the file titles.idx :<br /> <input type="file"

View File

@ -8,28 +8,6 @@ define(function(require) {
// http://zeptojs.com/
var $ = require('zepto');
var installBtn = document.getElementById('install-btn');
if(installBtn) {
installBtn.style.display = 'none';
// If you want an installation button, add this to your HTML:
//
// <button id="install-btn">Install</button>
//
// This code shows the button if the apps platform is available
// and this app isn't already installed.
if(navigator.mozApps) {
installBtn.addEventListener('click', function() {
navigator.mozApps.install(location.href + 'manifest.webapp');
}, false);
var req = navigator.mozApps.getSelf();
req.onsuccess = function() {
if(!req.result) {
installBtn.style.display = 'block';
}
};
}
}
// Evopedia javascript dependencies
var evopedia = require('evopedia');