Difference between revisions of "MediaWiki:Mobile.js"

From Kiwix
Jump to navigation Jump to search
Line 1: Line 1:
/* Any JavaScript here will be loaded for users using the mobile site */
/* Any JavaScript here will be loaded for users using the mobile site */
window.location.href= "market://details?id=org.kiwix.kiwixmobile";


/* "SmartBanner" dialog box for Android */
/* "SmartBanner" dialog box for Android */

Revision as of 18:53, 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("smartBanner")) {
    	if (confirm("Install Kiwix on your device?")) {
        	window.location.href= "market://details?id=org.kiwix.kiwixmobile";
    	}
    	$.cookie("smartBanner", true, { expires : 60 });
	}
}