// environment
var deviceMobile = 0;
// -- Check for device type
var ua = navigator.userAgent;
var checker = {
iphone: ua.match(/(iPhone|iPod|iPad)/),
blackberry: ua.match(/BlackBerry/),
android: ua.match(/Android/)
};
if (checker.android || checker.iphone || checker.blackberry) {
deviceMobile = 1;
}
var listenersAdded = false;
// adjust for mobile widths
if ($('#pp_infobox_master').length) {
if ($('#pp_infobox_master').css('display') != 'none'){
var fromTop = 430;
} else {
var fromTop = 140;
}
} else {
var fromTop = 140;
}
$(document).ready( function(){
// user selects puzzle, loads puzzle
(function(d, script) {
script = d.createElement('script');
script.type = 'text/javascript';
script.src = '../lib/xw/all/crossword.php?play_date=20240502&puzz_id=joseph';
script.id = 'crossword-load';
d.getElementsByTagName('body')[0].appendChild(script);
}(document));
});
function dispArchive() {
var linkHTML="";
// cycle through past 30 days
linkHTML += '
';
linkHTML += '';
linkHTML += '';
linkHTML += '';
linkHTML += '';
linkHTML += '';
linkHTML += '';
linkHTML += '';
linkHTML += '';
linkHTML += '';
linkHTML += '';
linkHTML += '';
linkHTML += '';
linkHTML += '';
linkHTML += '';
linkHTML += '';
linkHTML += '';
linkHTML += '';
linkHTML += '';
linkHTML += '';
linkHTML += 'Wednesday, April 24, 2024
';
linkHTML += '';
linkHTML += '';
linkHTML += '';
linkHTML += '';
linkHTML += '';
// add links html to modal
$('#archiveLinks').html(linkHTML);
// listens for date click/tap
$('.arch-link').click(function(e) {
// get date from selected HTML
var thisdate = parseInt($(this).attr('data-id'));
$('#modal-splash').iziModal('close');
// user selects puzzle, loads puzzle
(function(d, script) {
script = d.createElement('script');
script.type = 'text/javascript';
script.src = '../lib/xw/all/crossword.php?play_date=' + thisdate + '&puzz_id=joseph';
script.id = 'crossword-load';
d.getElementsByTagName('body')[0].appendChild(script);
}(document));
// window.top.location.href = "" + thisdate;
});
}
function dispSplash() {
$("#modal-splash").iziModal({
title: 'Crossword Puzzle Archives',
headerColor: '#19a575',
top: fromTop,
bodyOverflow: true,
openFullscreen: true,
closeButton: true,
closeOnEscape: true,
overlay: true,
overlayClose: false,
overlayColor: 'rgba(0, 0, 0, 0)',
/* width: 800 */
});
$('#modal-splash').iziModal('open');
// display archive
dispArchive();
}