Wiki fading out

For to fix what's broke, and improve what ain't. Or something thereabouts.

Moderator: Moderators

Post Reply
User avatar
Hannahmaus
Posts: 119
Joined: Mon Jun 02, 2008 11:28 am
Contact:

Wiki fading out

Post by Hannahmaus »

When I view the wiki, it gradually fades away. This is due to a bit of javascript which I've attached for posterity. Now April 1st has gone, can it be removed?

Code: Select all

<script>
	function fade() {
		var c = readCookie('thw_fade41');
		if(c == null){
			c = 1;
		}
		if (c > .005 ){
			for (i = c; i >= 0; i -= .005) {
				setTimeout("setOpacity(" + i + ")", (c-i) * 150000);
			}
	  }
	}
	
	function setOpacity(level) {
	  document.body.style.opacity = level;
	  document.body.style.MozOpacity = level;
	  document.body.style.KhtmlOpacity = level;
	  document.body.style.filter = "alpha(opacity=" + (level * 100) + ");";
	  createCookie('thw_fade41',level,1.5);
	}
	
	function createCookie(name,value,hours) {
		if (hours) {
			var date = new Date();
			date.setTime(date.getTime()+(hours*60*60*1000));
			var expires = "; expires="+date.toGMTString();
		}
		else var expires = "";
		document.cookie = name+"="+value+expires+"; path=/";
	}

	function readCookie(name) {
		var nameEQ = name + "=";
		var ca = document.cookie.split(';');
		for(var i=0;i < ca.length;i++) {
			var c = ca[i];
			while (c.charAt(0)==' ') c = c.substring(1,c.length);
			if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
		}
		return null;
	}

	function eraseCookie(name) {
		createCookie(name,"",-1);
	}
	fade();
zillow
Posts: 191
Joined: Thu Sep 04, 2008 5:33 pm
Contact:

Re: Wiki fading out

Post by zillow »

...Twilight Heroes and the wiki are not run by the same person so they have nothing to do with each other. You could delete this thread and move it to the wiki for better results
Image
User avatar
Cristiona
Posts: 5118
Joined: Sun Apr 08, 2007 1:01 am
Location: the Conservatory with the lead pipe
Contact:

Re: Wiki fading out

Post by Cristiona »

It's been fixed.
The churches are empty / The priest has gone home / And we are left standing / Together alone
--October Project: "Dark Time"
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest