FANDOM


<script> (function Terry2(){ if(typeof jQuery == 'undefined') { setTimeout(Terry2, 100); return; }

var questions = $('.question'); var temp = questions.children("center").not(':eq(-1)'); var picsp = $('.fool_story_progress'); var pics = picsp.children();

function show(div) { div.show(); if(div.data('storyInterval')) { var imgages = div.children('img'); var picNum = images.length; var currentIndex = 0;

function moveNext() { if(currentIndex >= picNum) { div.hide(); show(questions.eq(parseInt(div.data('yes')))); return; } images.eq(currentIndex).hide();

currentIndex++;

images.eq(currentIndex).show();

setTimeout(moveNext, div.data('sotryInterval')); }

setTimeout(moveNext, div.data('storyInterval')); }

if(div.data('autoSkip')) { setTimeout(function() { div.hide(); show(questions.eq(parseInt(div.data('yes')) - 1)); }, parseInt(div.data('autoSkip'))); } }

function bind($this, current, next) { if(current.data('delay')) { setTimeout(function() { current.hide(); show(next); }, parseInt(current.data('delay'))); $($this).off('click'); return; } if(current.data('exit')) { current.find('a:eq(0)').click(function() { setCookie('fools_played', '1', 1); }); } current.hide(); show(next); }

function setCookie(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays*24*60*60*1000)); var expires = "expires="+d.toUTCString(); document.cookie = cname + "=" + cvalue + "; " + expires + "; path=/"; }

function getCookie(cname) { var name = cname + "="; 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); if (c.indexOf(name) == 0) return c.substring(name.length,c.length); } return ""; }

if(getCookie('fools_played')) { window.location.href = 'http://zh.tos.wikia.com/wiki/临时主页'; }

temp.children().css('cursor', 'pointer'); temp.find(':first-child').children().click(function() { var current = $(this).parents('.question:eq(0)'); bind(this, current, questions.eq(parseInt(current.data('yes')) - 1)); }); temp.children().not(temp.find(':first-child')).children().click(function() { var current = $(this).parents('.question:eq(0)'); bind(this, current, questions.eq(parseInt(current.data('no')) - 1)); });


show(questions.eq(0));

$('.wikia-logo').attr('href', 'http://zh.tos.wikia.com/wiki/临时主页').click(function() { setCookie('fools_played', '1', 1); });

$('a[href="https:\/\/www.facebook.com/zhtoswikia"]').attr('target', '_blank');


pics.hide(); pics.eq(0).show(); })(); </script>

除了特别提示,社区内容遵循CC-BY-SA 授权许可。