var refreshIntervalId = null; // Prefer same-origin relative paths so HTTPS doesn't break due to mixed-content / upgrade rules. var imgurl = "img/"; function getApiUrl() { // Use scheme-relative URL so it matches http/https of the current page. // NOTE: if the API does not support https, consider proxying it via Apache and pointing to a same-origin endpoint. return "//api.martn.ncue.net/dreamgirl.ncue"; } function getRandomIndex(n) { var arr = new Array(); var temp; var rnum; for(var i=0; i"; text += " girl" + (i+1) + ""; text += " "; text += "
"; text += ""; } text += ""; $("#thumbs").html(text); initGallery(); } function fallbackToLocalManifest() { if (window.DREAMGIRL_IMAGES && window.DREAMGIRL_IMAGES.length) { buildThumbsFromList(window.DREAMGIRL_IMAGES); return true; } // Minimal fallback if manifest is missing for some reason buildThumbsFromList(['0.jpg','1.jpg','2.jpg','3.jpg','20.jpg','24.jpg','25.jpg','26.jpg','28.jpg','36.jpg','66.jpg']); return true; } $.ajax({ url : getApiUrl(), type: 'GET', data : "id=user", dataType : "jsonp", jsonp : "callback", cache : false, timeout: 15000, success: function(data) { try { var filelist = data && data.filelist ? data.filelist : null; if (!filelist || !filelist.length) return fallbackToLocalManifest(); var names = []; for (var i=0; i"); }, 3000); */ $("#toggle").html("stop"); } }