mirror of
https://github.com/kiwix/kiwix-js.git
synced 2025-09-22 12:01:15 -04:00
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:
parent
50e62b618e
commit
3f382a572a
@ -31,7 +31,7 @@ License:
|
|||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- <link rel="stylesheet" href="css/app.css"> -->
|
<!-- TODO : implement CSS <link rel="stylesheet" href="css/app.css"> -->
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Evopedia</h1>
|
<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>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>
|
<li>It is hardly usable on a device because the buttons and inputs are too small</li>
|
||||||
</ul>
|
</ul>
|
||||||
<br />
|
<br />
|
||||||
<button id="install-btn">Install</button>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="openLocalFiles" style="display: none;">
|
<div id="openLocalFiles" style="display: none;">
|
||||||
<br /> Please select the file titles.idx :<br /> <input type="file"
|
<br /> Please select the file titles.idx :<br /> <input type="file"
|
||||||
|
22
js/app.js
22
js/app.js
@ -8,28 +8,6 @@ define(function(require) {
|
|||||||
// http://zeptojs.com/
|
// http://zeptojs.com/
|
||||||
var $ = require('zepto');
|
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
|
// Evopedia javascript dependencies
|
||||||
var evopedia = require('evopedia');
|
var evopedia = require('evopedia');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user