Add to Home Screen on click - Follow up

Continuing the discussion from Add to Home Screen on click:

What I’m trying to do:
I am trying to understand the code below so I can adapt it to show the button if the app has not been installed. If it has been installed then the button should be hidden. At the moment I cannot even get the sample below to work so I must be missing something.

What I’ve tried and what’s not working:
Installed the clone and ran it as is but the install button never shows.
Is there something In am missing to make this run as is (before I adapt it)?

Code Sample:
As above

Clone link:
As above

1 Like

If you just remove the if get_visited(): logic you’ll see the button visible more consistently.

That logic is supposed to prevent users seeing the install button more than once.

2 Likes