// Initializer for `/fullscreen` (login/register overlays + fullscreen feed). // Goal: reduce template inline JS without changing behavior. (function($){ function choice(a) { return a[Math.floor(Math.random() * a.length)]; } function defaultPop(url) { var newwindow = window.open( url, 'name', 'height=50,width=400,left=20,top=20,location=0,status=0,scrollbar=0,resizable=0' ); if (window.focus && newwindow) { newwindow.focus(); } return newwindow; } if (typeof window.pop !== 'function') { window.pop = defaultPop; } var urls = [ 'https://archive.hump.fm/images/20100601/1275428508049-dumpfm-foot-oie_oie_overlay-1.gif', 'https://archive.hump.fm/images/20100928/1285728674225-dumpfm-timb-running.unicorn.gif', 'https://archive.hump.fm/images/20100726/1280119193796-dumpfm-enso-human-condition.gif', 'https://archive.hump.fm/images/20100521/1274415795577-dumpfm-ucnv-mx.gif', 'https://archive.hump.fm/images/20100912/1284315873224-dumpfm-Neontoast-1283990707508-dumpfm-crunkus-crabtoon.gif', 'https://archive.hump.fm/images/20110927/1317105622918-dumpfm-peachfist-test8scam.gif', 'https://archive.hump.fm/images/20110323/1300915179773-dumpfm-blingscience-fishtank.gif', 'https://archive.hump.fm/images/20110418/1303108538834-dumpfm-LAVARLAMAR-lettuce_lavarlamar.gif', 'https://s3.amazonaws.com/i.asdf.us/im/84/gradient_horse_1318306378_1322355741_ryz_1337322355_ryz.gif', 'https://archive.hump.fm/images/20110724/1311552093462-dumpfm-hologrampa-1291586335941-dumpfm-jeeeelings-cat_face_wink_hologrampa-lettuce.gif', 'https://s3.amazonaws.com/i.asdf.us/im/be/tt7620731fltt_1315431978.gif' ]; // Legacy behavior: register these on DOM-ready (historically done via `jQuery(initLogin)`). if (typeof window.initLogin === 'function') { $(window.initLogin); } if (typeof window.startChatUpdater === 'function') { $(window.startChatUpdater); } if (window.location && window.location.href.indexOf('nologin') !== -1) { $('#loginbox').hide(); } var bigImage = document.getElementById('big-image'); if (bigImage) { bigImage.innerHTML = ""; } if (typeof window.initFullscreen === 'function') { window.initFullscreen(); } if (typeof window.initRegister === 'function') { window.initRegister(); } $('#reglink').click(function(e){ e.preventDefault(); $('#loginbox').hide(); $('#registerbox').show().addClass('b'); return false; }); $('#nickInput').focus(); })(jQuery);