Difference between revisions of "MediaWiki:Mobile.js"
Jump to navigation
Jump to search
Line 3: | Line 3: | ||
/* "SmartBanner" dialog box for Android */ | /* "SmartBanner" dialog box for Android */ | ||
if (navigator.userAgent.toLowerCase().indexOf("android") > -1) { | if (navigator.userAgent.toLowerCase().indexOf("android") > -1) { | ||
if ($.cookie(" | if (!$.cookie("smartAndroidBanner")) { | ||
if (confirm("Install Kiwix on your device?")) { | if (confirm("Install Kiwix on your device?")) { | ||
window.location.href= "market://details?id=org.kiwix.kiwixmobile"; | window.location.href= "market://details?id=org.kiwix.kiwixmobile"; | ||
} | } | ||
$.cookie(" | $.cookie("smartAndroidBanner", true, { expires : 60 }); | ||
} | } | ||
} | } |
Revision as of 19:00, 8 November 2015
/* Any JavaScript here will be loaded for users using the mobile site */
/* "SmartBanner" dialog box for Android */
if (navigator.userAgent.toLowerCase().indexOf("android") > -1) {
if (!$.cookie("smartAndroidBanner")) {
if (confirm("Install Kiwix on your device?")) {
window.location.href= "market://details?id=org.kiwix.kiwixmobile";
}
$.cookie("smartAndroidBanner", true, { expires : 60 });
}
}