Skip to content

feat: Make android edge optional #90

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ This should be a quick drop-in library into your website.

maxModalDisplayCount: -1, // If set, the modal will only show this many times.
// [Optional] Default: -1 (no limit). (Debugging: Use this.clearModalDisplayCount() to reset the count)
displayOptions:{ showMobile: true, showDesktop: true }, // show on mobile/desktop [Optional] Default: show everywhere
displayOptions:{ // show on mobile/desktop [Optional] Default: show everywhere
showMobile: true,
showDesktop: true,
showAndroidEdge: false, // [Optional] Default: false. Android edge saves to home screen as a link to the site on the edge browser. This is not the most desirable experience for some so this is off by default but can be enabled with this option.
},
allowClose: true, // allow the user to close the modal by tapping outside of it [Optional. Default: true]
showArrow: true, // show the bouncing arrow on the modal [Optional. Default: true] (highly recommend leaving at true as drastically affects install rates)
});
Expand Down
5 changes: 3 additions & 2 deletions dist/add-to-homescreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ function AddToHomeScreen(options) {
ret = new types_1.DeviceInfo((_isStandAlone = false), (_canBeStandAlone = true), (_device = _device));
_genAndroidChrome(container);
}
else if (isBrowserAndroidEdge()) {
else if (isBrowserAndroidEdge() && displayOptions.showAndroidEdge) {
ret = new types_1.DeviceInfo((_isStandAlone = false), (_canBeStandAlone = true), (_device = _device));
_genAndroidEdge(container);
}
Expand Down Expand Up @@ -917,7 +917,8 @@ class DeviceInfo {
exports.DeviceInfo = DeviceInfo;
exports.DISPLAY_OPTIONS_DEFAULT = {
showMobile: true,
showDesktop: true
showDesktop: true,
showAndroidEdge: false,
};
function isDisplayOptions(obj) {
return obj
Expand Down
2 changes: 1 addition & 1 deletion dist/add-to-homescreen.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_ar.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_cs.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_da.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_de.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_en.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_es.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_fr.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_he.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_it.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_ja.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_ko.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_lv.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_nl.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_pl.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_pt.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_ru.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_sl.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_sq.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_sr.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_sv.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_th.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_tr.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_vn.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_zh.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_zh_CN.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_zh_HK.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/add-to-homescreen_zh_TW.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/debug.html
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@
appIconUrl: "./assets/sample/img/aardvark-logo.png", // App icon link (square, at least 40 x 40 pixels) [Required]
assetUrl: "./assets/img/", // Link to directory of library image assets [Required]
maxModalDisplayCount: -1, // If set, the modal will only show this many times [Optional. Default: -1 (no limit).]
displayOptions:{ showMobile: true, showDesktop: true }, // show on mobile/desktop [Optional] Default: show everywhere
displayOptions:{ showMobile: true, showDesktop: true, showAndroidEdge: true }, // show on mobile/desktop [Optional] Default: show everywhere
allowClose: true, // allow the user to close the modal by tapping outside of it. [Optional. Default: true]
showArrow: true, // show the arrow on the modal [Optional. Default: true]
// (Debugging: Use this.clearModalDisplayCount() to reset the count)
Expand Down
2 changes: 1 addition & 1 deletion dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@
appIconUrl: "./assets/sample/img/aardvark-logo.png", // App icon link (square, at least 40 x 40 pixels) [Required]
assetUrl: "./assets/img/", // Link to directory of library image assets [Required]
maxModalDisplayCount: -1, // If set, the modal will only show this many times [Optional. Default: -1 (no limit).]
displayOptions:{ showMobile: true, showDesktop: true }, // show on mobile/desktop [Optional] Default: show everywhere
displayOptions:{ showMobile: true, showDesktop: true, showAndroidEdge: true }, // show on mobile/desktop [Optional] Default: show everywhere
allowClose: true, // allow the user to close the modal by tapping outside of it. [Optional. Default: true]
showArrow: true, // show the arrow on the modal [Optional. Default: true]
// (Debugging: Use this.clearModalDisplayCount() to reset the count)
Expand Down
2 changes: 1 addition & 1 deletion dist/index_ar.html
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@
appIconUrl: "./assets/sample/img/aardvark-logo.png", // App icon link (square, at least 40 x 40 pixels) [Required]
assetUrl: "./assets/img/", // Link to directory of library image assets [Required]
maxModalDisplayCount: -1, // If set, the modal will only show this many times [Optional. Default: -1 (no limit).]
displayOptions:{ showMobile: true, showDesktop: true }, // show on mobile/desktop [Optional] Default: show everywhere
displayOptions:{ showMobile: true, showDesktop: true, showAndroidEdge: true }, // show on mobile/desktop [Optional] Default: show everywhere
allowClose: true, // allow the user to close the modal by tapping outside of it. [Optional. Default: true]
showArrow: true, // show the arrow on the modal [Optional. Default: true]
// (Debugging: Use this.clearModalDisplayCount() to reset the count)
Expand Down
2 changes: 1 addition & 1 deletion dist/index_cs.html
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@
appIconUrl: "./assets/sample/img/aardvark-logo.png", // App icon link (square, at least 40 x 40 pixels) [Required]
assetUrl: "./assets/img/", // Link to directory of library image assets [Required]
maxModalDisplayCount: -1, // If set, the modal will only show this many times [Optional. Default: -1 (no limit).]
displayOptions:{ showMobile: true, showDesktop: true }, // show on mobile/desktop [Optional] Default: show everywhere
displayOptions:{ showMobile: true, showDesktop: true, showAndroidEdge: true }, // show on mobile/desktop [Optional] Default: show everywhere
allowClose: true, // allow the user to close the modal by tapping outside of it. [Optional. Default: true]
showArrow: true, // show the arrow on the modal [Optional. Default: true]
// (Debugging: Use this.clearModalDisplayCount() to reset the count)
Expand Down
2 changes: 1 addition & 1 deletion dist/index_da.html
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@
appIconUrl: "./assets/sample/img/aardvark-logo.png", // App icon link (square, at least 40 x 40 pixels) [Required]
assetUrl: "./assets/img/", // Link to directory of library image assets [Required]
maxModalDisplayCount: -1, // If set, the modal will only show this many times [Optional. Default: -1 (no limit).]
displayOptions:{ showMobile: true, showDesktop: true }, // show on mobile/desktop [Optional] Default: show everywhere
displayOptions:{ showMobile: true, showDesktop: true, showAndroidEdge: true }, // show on mobile/desktop [Optional] Default: show everywhere
allowClose: true, // allow the user to close the modal by tapping outside of it. [Optional. Default: true]
showArrow: true, // show the arrow on the modal [Optional. Default: true]
// (Debugging: Use this.clearModalDisplayCount() to reset the count)
Expand Down
2 changes: 1 addition & 1 deletion dist/index_de.html
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@
appIconUrl: "./assets/sample/img/aardvark-logo.png", // App icon link (square, at least 40 x 40 pixels) [Required]
assetUrl: "./assets/img/", // Link to directory of library image assets [Required]
maxModalDisplayCount: -1, // If set, the modal will only show this many times [Optional. Default: -1 (no limit).]
displayOptions:{ showMobile: true, showDesktop: true }, // show on mobile/desktop [Optional] Default: show everywhere
displayOptions:{ showMobile: true, showDesktop: true, showAndroidEdge: true }, // show on mobile/desktop [Optional] Default: show everywhere
allowClose: true, // allow the user to close the modal by tapping outside of it. [Optional. Default: true]
showArrow: true, // show the arrow on the modal [Optional. Default: true]
// (Debugging: Use this.clearModalDisplayCount() to reset the count)
Expand Down
2 changes: 1 addition & 1 deletion dist/index_en.html
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@
appIconUrl: "./assets/sample/img/aardvark-logo.png", // App icon link (square, at least 40 x 40 pixels) [Required]
assetUrl: "./assets/img/", // Link to directory of library image assets [Required]
maxModalDisplayCount: -1, // If set, the modal will only show this many times [Optional. Default: -1 (no limit).]
displayOptions:{ showMobile: true, showDesktop: true }, // show on mobile/desktop [Optional] Default: show everywhere
displayOptions:{ showMobile: true, showDesktop: true, showAndroidEdge: true }, // show on mobile/desktop [Optional] Default: show everywhere
allowClose: true, // allow the user to close the modal by tapping outside of it. [Optional. Default: true]
showArrow: true, // show the arrow on the modal [Optional. Default: true]
// (Debugging: Use this.clearModalDisplayCount() to reset the count)
Expand Down
2 changes: 1 addition & 1 deletion dist/index_es.html
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@
appIconUrl: "./assets/sample/img/aardvark-logo.png", // App icon link (square, at least 40 x 40 pixels) [Required]
assetUrl: "./assets/img/", // Link to directory of library image assets [Required]
maxModalDisplayCount: -1, // If set, the modal will only show this many times [Optional. Default: -1 (no limit).]
displayOptions:{ showMobile: true, showDesktop: true }, // show on mobile/desktop [Optional] Default: show everywhere
displayOptions:{ showMobile: true, showDesktop: true, showAndroidEdge: true }, // show on mobile/desktop [Optional] Default: show everywhere
allowClose: true, // allow the user to close the modal by tapping outside of it. [Optional. Default: true]
showArrow: true, // show the arrow on the modal [Optional. Default: true]
// (Debugging: Use this.clearModalDisplayCount() to reset the count)
Expand Down
2 changes: 1 addition & 1 deletion dist/index_fr.html
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@
appIconUrl: "./assets/sample/img/aardvark-logo.png", // App icon link (square, at least 40 x 40 pixels) [Required]
assetUrl: "./assets/img/", // Link to directory of library image assets [Required]
maxModalDisplayCount: -1, // If set, the modal will only show this many times [Optional. Default: -1 (no limit).]
displayOptions:{ showMobile: true, showDesktop: true }, // show on mobile/desktop [Optional] Default: show everywhere
displayOptions:{ showMobile: true, showDesktop: true, showAndroidEdge: true }, // show on mobile/desktop [Optional] Default: show everywhere
allowClose: true, // allow the user to close the modal by tapping outside of it. [Optional. Default: true]
showArrow: true, // show the arrow on the modal [Optional. Default: true]
// (Debugging: Use this.clearModalDisplayCount() to reset the count)
Expand Down
2 changes: 1 addition & 1 deletion dist/index_he.html
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@
appIconUrl: "./assets/sample/img/aardvark-logo.png", // App icon link (square, at least 40 x 40 pixels) [Required]
assetUrl: "./assets/img/", // Link to directory of library image assets [Required]
maxModalDisplayCount: -1, // If set, the modal will only show this many times [Optional. Default: -1 (no limit).]
displayOptions:{ showMobile: true, showDesktop: true }, // show on mobile/desktop [Optional] Default: show everywhere
displayOptions:{ showMobile: true, showDesktop: true, showAndroidEdge: true }, // show on mobile/desktop [Optional] Default: show everywhere
allowClose: true, // allow the user to close the modal by tapping outside of it. [Optional. Default: true]
showArrow: true, // show the arrow on the modal [Optional. Default: true]
// (Debugging: Use this.clearModalDisplayCount() to reset the count)
Expand Down
2 changes: 1 addition & 1 deletion dist/index_it.html
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@
appIconUrl: "./assets/sample/img/aardvark-logo.png", // App icon link (square, at least 40 x 40 pixels) [Required]
assetUrl: "./assets/img/", // Link to directory of library image assets [Required]
maxModalDisplayCount: -1, // If set, the modal will only show this many times [Optional. Default: -1 (no limit).]
displayOptions:{ showMobile: true, showDesktop: true }, // show on mobile/desktop [Optional] Default: show everywhere
displayOptions:{ showMobile: true, showDesktop: true, showAndroidEdge: true }, // show on mobile/desktop [Optional] Default: show everywhere
allowClose: true, // allow the user to close the modal by tapping outside of it. [Optional. Default: true]
showArrow: true, // show the arrow on the modal [Optional. Default: true]
// (Debugging: Use this.clearModalDisplayCount() to reset the count)
Expand Down
2 changes: 1 addition & 1 deletion dist/index_ja.html
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@
appIconUrl: "./assets/sample/img/aardvark-logo.png", // App icon link (square, at least 40 x 40 pixels) [Required]
assetUrl: "./assets/img/", // Link to directory of library image assets [Required]
maxModalDisplayCount: -1, // If set, the modal will only show this many times [Optional. Default: -1 (no limit).]
displayOptions:{ showMobile: true, showDesktop: true }, // show on mobile/desktop [Optional] Default: show everywhere
displayOptions:{ showMobile: true, showDesktop: true, showAndroidEdge: true }, // show on mobile/desktop [Optional] Default: show everywhere
allowClose: true, // allow the user to close the modal by tapping outside of it. [Optional. Default: true]
showArrow: true, // show the arrow on the modal [Optional. Default: true]
// (Debugging: Use this.clearModalDisplayCount() to reset the count)
Expand Down
2 changes: 1 addition & 1 deletion dist/index_ko.html
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@
appIconUrl: "./assets/sample/img/aardvark-logo.png", // App icon link (square, at least 40 x 40 pixels) [Required]
assetUrl: "./assets/img/", // Link to directory of library image assets [Required]
maxModalDisplayCount: -1, // If set, the modal will only show this many times [Optional. Default: -1 (no limit).]
displayOptions:{ showMobile: true, showDesktop: true }, // show on mobile/desktop [Optional] Default: show everywhere
displayOptions:{ showMobile: true, showDesktop: true, showAndroidEdge: true }, // show on mobile/desktop [Optional] Default: show everywhere
allowClose: true, // allow the user to close the modal by tapping outside of it. [Optional. Default: true]
showArrow: true, // show the arrow on the modal [Optional. Default: true]
// (Debugging: Use this.clearModalDisplayCount() to reset the count)
Expand Down
2 changes: 1 addition & 1 deletion dist/index_lv.html
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@
appIconUrl: "./assets/sample/img/aardvark-logo.png", // App icon link (square, at least 40 x 40 pixels) [Required]
assetUrl: "./assets/img/", // Link to directory of library image assets [Required]
maxModalDisplayCount: -1, // If set, the modal will only show this many times [Optional. Default: -1 (no limit).]
displayOptions:{ showMobile: true, showDesktop: true }, // show on mobile/desktop [Optional] Default: show everywhere
displayOptions:{ showMobile: true, showDesktop: true, showAndroidEdge: true }, // show on mobile/desktop [Optional] Default: show everywhere
allowClose: true, // allow the user to close the modal by tapping outside of it. [Optional. Default: true]
showArrow: true, // show the arrow on the modal [Optional. Default: true]
// (Debugging: Use this.clearModalDisplayCount() to reset the count)
Expand Down
2 changes: 1 addition & 1 deletion dist/index_nl.html
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@
appIconUrl: "./assets/sample/img/aardvark-logo.png", // App icon link (square, at least 40 x 40 pixels) [Required]
assetUrl: "./assets/img/", // Link to directory of library image assets [Required]
maxModalDisplayCount: -1, // If set, the modal will only show this many times [Optional. Default: -1 (no limit).]
displayOptions:{ showMobile: true, showDesktop: true }, // show on mobile/desktop [Optional] Default: show everywhere
displayOptions:{ showMobile: true, showDesktop: true, showAndroidEdge: true }, // show on mobile/desktop [Optional] Default: show everywhere
allowClose: true, // allow the user to close the modal by tapping outside of it. [Optional. Default: true]
showArrow: true, // show the arrow on the modal [Optional. Default: true]
// (Debugging: Use this.clearModalDisplayCount() to reset the count)
Expand Down
2 changes: 1 addition & 1 deletion dist/index_pl.html
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@
appIconUrl: "./assets/sample/img/aardvark-logo.png", // App icon link (square, at least 40 x 40 pixels) [Required]
assetUrl: "./assets/img/", // Link to directory of library image assets [Required]
maxModalDisplayCount: -1, // If set, the modal will only show this many times [Optional. Default: -1 (no limit).]
displayOptions:{ showMobile: true, showDesktop: true }, // show on mobile/desktop [Optional] Default: show everywhere
displayOptions:{ showMobile: true, showDesktop: true, showAndroidEdge: true }, // show on mobile/desktop [Optional] Default: show everywhere
allowClose: true, // allow the user to close the modal by tapping outside of it. [Optional. Default: true]
showArrow: true, // show the arrow on the modal [Optional. Default: true]
// (Debugging: Use this.clearModalDisplayCount() to reset the count)
Expand Down
2 changes: 1 addition & 1 deletion dist/index_pt.html
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@
appIconUrl: "./assets/sample/img/aardvark-logo.png", // App icon link (square, at least 40 x 40 pixels) [Required]
assetUrl: "./assets/img/", // Link to directory of library image assets [Required]
maxModalDisplayCount: -1, // If set, the modal will only show this many times [Optional. Default: -1 (no limit).]
displayOptions:{ showMobile: true, showDesktop: true }, // show on mobile/desktop [Optional] Default: show everywhere
displayOptions:{ showMobile: true, showDesktop: true, showAndroidEdge: true }, // show on mobile/desktop [Optional] Default: show everywhere
allowClose: true, // allow the user to close the modal by tapping outside of it. [Optional. Default: true]
showArrow: true, // show the arrow on the modal [Optional. Default: true]
// (Debugging: Use this.clearModalDisplayCount() to reset the count)
Expand Down
2 changes: 1 addition & 1 deletion dist/index_ru.html
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@
appIconUrl: "./assets/sample/img/aardvark-logo.png", // App icon link (square, at least 40 x 40 pixels) [Required]
assetUrl: "./assets/img/", // Link to directory of library image assets [Required]
maxModalDisplayCount: -1, // If set, the modal will only show this many times [Optional. Default: -1 (no limit).]
displayOptions:{ showMobile: true, showDesktop: true }, // show on mobile/desktop [Optional] Default: show everywhere
displayOptions:{ showMobile: true, showDesktop: true, showAndroidEdge: true }, // show on mobile/desktop [Optional] Default: show everywhere
allowClose: true, // allow the user to close the modal by tapping outside of it. [Optional. Default: true]
showArrow: true, // show the arrow on the modal [Optional. Default: true]
// (Debugging: Use this.clearModalDisplayCount() to reset the count)
Expand Down
2 changes: 1 addition & 1 deletion dist/index_sl.html
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@
appIconUrl: "./assets/sample/img/aardvark-logo.png", // App icon link (square, at least 40 x 40 pixels) [Required]
assetUrl: "./assets/img/", // Link to directory of library image assets [Required]
maxModalDisplayCount: -1, // If set, the modal will only show this many times [Optional. Default: -1 (no limit).]
displayOptions:{ showMobile: true, showDesktop: true }, // show on mobile/desktop [Optional] Default: show everywhere
displayOptions:{ showMobile: true, showDesktop: true, showAndroidEdge: true }, // show on mobile/desktop [Optional] Default: show everywhere
allowClose: true, // allow the user to close the modal by tapping outside of it. [Optional. Default: true]
showArrow: true, // show the arrow on the modal [Optional. Default: true]
// (Debugging: Use this.clearModalDisplayCount() to reset the count)
Expand Down
Loading