Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
We have several functionalities that will work only with JavaScript, including:
iOS chromeless detection
Session data download
Session list and session details dynamic page generation
Here is the code for the index.js file:
var data;
$(document).bind("mobileinit", function() {
if (navigator.platform=="iPhone" || navigator.platform=="iPad" ||
navigator.platform=="iPod" || navigator.platform=="iPad" ||
navigator.platform=="iPhone Simulator" ) {
// It's an iOS device, we check if we are in chrome-less mode
if (!navigator.standalone) {
showIOSInvitation();
}
}
/* We capture the sessions page load to check dynamic session data */
$("#sessions").live("pageshow", function() {
if (window.localStorage!=undefined) {
// HTML5 Local Storage is available
if (window.local....