Difference between revisions of "MediaWiki:Mobile.js"

Jump to navigation Jump to search
no edit summary
Line 2: Line 2:


/* "SmartBanner" dialog box for Android */
/* "SmartBanner" dialog box for Android */
if (!document.cookie.indexOf("smartBanner") < 0) {
if (document.cookie.indexOf("smartBanner") < 0) {
   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";
Line 8: Line 8:


   expiry = new Date();
   expiry = new Date();
   expiry.setTime(date.getTime()+(10*60*1000)); // Ten minutes
   expiry.setTime(date.getTime()+(100*24*60*60*1000)); // Ten minutes
   document.cookie = "smartBanner=true; expires=" + expiry.toGMTString();
   document.cookie = "smartBanner=true; expires=" + expiry.toGMTString();
}
}

Navigation menu