add-to-homescreen
add-to-homescreen copied to clipboard
Nothing Happens...? [SOLVED]
I have include the source files and shot them to a server to test on a mobile device. But nothing happens. The online demo page works, but the git repo files do not?
nicholasbydesign.getforge.io
On http://nicholasbydesign.getforge.io you only include the files. Now you also have to start the script:
<script>
addToHomescreen();
</script>
I did, it is in the head of the document as per the demo.
I found after doing some digging there is a object in localstorage. This prevented mine from working after viewing the demo and then running my own code.
mmm, you marked it as solved? Can you close the issue then?
I am having the exact same issue right now. Your page and the online demo page from cubiq work fine. Mine doesn't. Could you maybe elaborate how you got it fixed? Especially since I can currently use both sites and it's working on both I don't quite understand how a localstorage object is preventing the popup on my own site.
@PearlyGates try adding the addToHomeScreen script to the bottom of your document instead where its at currently (header), that fixed my issue.
Yes, same fix (keep script in the header, but call it later in the page) works for me too.
Unfortunately, I have the same problem. Calling the script right before the </body>
also does nothing :(
Ignore my problem. It is solved. I'm new to web apps so I didn't know i had to add both addtohomescreen.js & addtohomescreen.min.js to my site.
Sorry for the late answer. But just so you know: Having to add both the min and the normal .js file should normally not be the solution.
Files that are named {filename}.min.js have been minified, which actually just means, that the content has been shortened by some kind of tool. The min and non-min file are essentially exactly the same.
Von meinem iPhone gesendet
Am 09.08.2017 um 18:57 schrieb x10sys [email protected]:
Ignore my problem. It is solved. I'm new to web apps so I didn't know i had to add both addtohomescreen.js & addtohomescreen.min.js to my site.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
@PearlyGates That is exactly what I thought. But it didn't work till I've copied normal .js. Strange...
Seems not work with a pjax based site (same scripts worked fine in a blank html file) :( Must I use <a> tag as the "Add to bookmark" button?
Hi! Please can You tell me how to hide the banner after example 3 visit on the page?