From e6b60448bc08df316daf220db8ecfddc58aefe84 Mon Sep 17 00:00:00 2001 From: Snap Date: Fri, 1 May 2015 16:25:28 -0700 Subject: Minor fixes and adjustments. Moved Javascript in chat to: js/chat.js re-ordered script loading so Jquery loads first. Fixed cookie login issue. --- js/globe.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'js/globe.js') diff --git a/js/globe.js b/js/globe.js index 1dc61a0..0893f20 100644 --- a/js/globe.js +++ b/js/globe.js @@ -9,6 +9,36 @@ function hideSignin() { } } + +function savePref(pref, value) { + setCookie('pref_'+pref, value, 9999); +} + +//Cookie functions from w3schools.com +function setCookie(c_name,value,exdays) +{ + var exdate=new Date(); + exdate.setDate(exdate.getDate() + exdays); + var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString()); + document.cookie=c_name + "=" + c_value; +} +function getCookie(c_name) +{ + var i,x,y,ARRcookies=document.cookie.split(";"); + for (i=0;i