Skip to content

Commit

Permalink
Fix readme.md and index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
markafoltz committed Oct 14, 2024
1 parent 8afb0af commit 7e101f1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
10 changes: 6 additions & 4 deletions app-install-banner/deferred-banner/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<body>
<h1>Web App Install Banner: Defer prompt of banner sample</h1>

<p>Available in <a href="https://www.chromestatus.com/features/4540065577435136">Chrome 45+ (for Android)</a></p>
<p>Available in <a href="https://www.chromestatus.com/features/6560913322672128">Chrome 45+</a></p>

<p>The <a href="https://developers.google.com/web/fundamentals/engage-and-retain/app-install-banners/">web app install banner</a> will prompt the user to add your web app to the users home screen.
It will only prompt when a number of criteria have been met:
Expand All @@ -42,16 +42,18 @@ <h1>Web App Install Banner: Defer prompt of banner sample</h1>
This API and example shows you how you can defer the prompt until a later time, in this case when the
user clicks the button below. If the button below is disabled, Chrome has chosen now is not a good time to
show the prompt.</p>

<p>If the button is disabled, come back in a few minutes and the button will be enabled.</p>

<p>For testing, we encourage you to force the button to be enabled by setting the
chrome://flags/#bypass-app-banner-engagement-checks flag.</p>

<button id="btnSave" disabled>Click this to show the prompt</button>

<p>Below you will see the output of the example.</p>

<pre id=output></pre>

<p>For testing we encourage you to force the banner to appear by setting the chrome://flags/#bypass-app-banner-engagement-checks flag.</p>
<p>To see if this example works, come back after a few minutes and you will see the banner.</p>

<script>
window.addEventListener('load', function() {

Expand Down
12 changes: 6 additions & 6 deletions app-install-banner/deferred-banner/readme.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
App Install Banner User Response Sample
Deferred App Install Banner Sample
===

See https://googlechrome.github.io/samples/app-install-banner/useraction-banner/index.html for a live demo.
See https://googlechrome.github.io/samples/app-install-banner/deferred-banner/index.html for a live demo.


#### Directions:

* Install Chrome, or another browser that supports Service Workers and manifest
* Visit the site over two separate days.
* Or, more usefully, enable chrome://flags/#bypass-app-banner-engagement-checks
* Install Chrome, or another browser that supports Service Workers and manifest.
* Wait a day.
* Or, enable chrome://flags/#bypass-app-banner-engagement-checks to enable the button right away.

On the second vist, you will see a message on the page that says the user either installed the app or dismissed the banner.
Once the button is enabled, Chrome will display the Add to Home Screen prompt when you click it.

0 comments on commit 7e101f1

Please sign in to comment.