Tower of Saviors 維基
Tower of Saviors 維基
无编辑摘要
标签sourceedit
无编辑摘要
标签sourceedit
第31行: 第31行:
 
show(next);
 
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;
  +
}
   
 
temp.children().css('cursor', 'pointer');
 
temp.children().css('cursor', 'pointer');
第47行: 第54行:
 
$('.wikia-logo').attr('href', 'http://zh.tos.wikia.com/wiki/臨時主頁');
 
$('.wikia-logo').attr('href', 'http://zh.tos.wikia.com/wiki/臨時主頁');
   
$('a[href="https:\/\/www.facebook.com/zhtoswikia"]').attr('target', '_blank');
+
$('a[href="https:\/\/www.facebook.com/zhtoswikia"]').attr('target', '_blank').click(function() {
  +
setCookie('fools_played', '1', 1);
  +
});
 
 
 
})();
 
})();

2015年3月29日 (日) 18:03的版本

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

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

function show(div) { div.show(); if(div.data('autoSkip')) { setTimeout(function() { div.hide(); show(questions.eq(parseInt(div.data('yes')))); }, 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; } 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; }

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.find(':nth-child(2)').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/臨時主頁');

$('a[href="https:\/\/www.facebook.com/zhtoswikia"]').attr('target', '_blank').click(function() { setCookie('fools_played', '1', 1); });

})(); </script>