Update.
This commit is contained in:
parent
2ab4341d00
commit
e21880b4f5
@ -1,7 +1,20 @@
|
||||
{
|
||||
"id": "snek",
|
||||
"name": "Snek",
|
||||
"description": "Danger noodle",
|
||||
"display": "standalone",
|
||||
"orientation": "portrait",
|
||||
"scope": "/web.html",
|
||||
"theme_color": "#000000",
|
||||
"background_color": "#000000",
|
||||
"related_applications": [],
|
||||
"prefer_related_applications": false,
|
||||
"screenshots": [],
|
||||
"dir": "ltr",
|
||||
"lang": "en-US",
|
||||
"launch_path": "/web.html",
|
||||
"display_override": ["browser"],
|
||||
"short_name": "Snek",
|
||||
"start_url": "/web.html",
|
||||
"icons": [
|
||||
{
|
||||
|
@ -3,9 +3,12 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
<title>Snek</title>
|
||||
<style>{{highlight_styles}}</style>
|
||||
<!--
|
||||
<script src="/push.js"></script>
|
||||
-->
|
||||
<script src="/fancy-button.js"></script>
|
||||
<script src="/upload-button.js"></script>
|
||||
<script src="/generic-form.js"></script>
|
||||
@ -13,7 +16,7 @@
|
||||
<script src="/schedule.js"></script>
|
||||
<script src="/app.js"></script>
|
||||
<link rel="stylesheet" href="/base.css">
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
|
||||
<link rel="icon" type="image/png" href="/image/snek1.png" sizes="32x32">
|
||||
</head>
|
||||
<body>
|
||||
@ -45,20 +48,22 @@
|
||||
</main>
|
||||
<script>
|
||||
let installPrompt = null
|
||||
window.addEventListener("beforeinstallprompt", async(event) => {
|
||||
event.preventDefault();
|
||||
installPrompt = event;
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
alert("Jaaah")
|
||||
window.addEventListener("beforeinstallprompt", (e) => {
|
||||
//e.preventDefault();
|
||||
installPrompt = e;
|
||||
//document.addEventListener("DOMContentLoaded", () => {
|
||||
const button = document.getElementById("install-button")
|
||||
button.addEventListener("click", async ()=>{
|
||||
const result = await installPrompt.prompt()
|
||||
console.info(result.outcome)
|
||||
})
|
||||
|
||||
button.style.display = 'inline-block'
|
||||
|
||||
button.addEventListener("click", async ()=>{
|
||||
const result = await installPrompt.prompt()
|
||||
console.info(result.outcome)
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
})
|
||||
|
||||
;
|
||||
</script>
|
||||
</body>
|
||||
|
Loading…
Reference in New Issue
Block a user