Mayx's Home Page https://mabbs.github.io
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.9 KiB

3 years ago
  1. (function() {
  2. var $backToTopTxt = "返回顶部", $backToTopEle = $('<div class="backToTop"></div>').appendTo($("body"))
  3. .text($backToTopTxt).attr("title", $backToTopTxt).click(function() {
  4. $("html, body").animate({ scrollTop: 0 }, 120);
  5. }), $backToTopFun = function() {
  6. var st = $(document).scrollTop(), winh = $(window).height();
  7. (st > 0)? $backToTopEle.show(): $backToTopEle.hide();
  8. };
  9. $(window).bind("scroll", $backToTopFun);
  10. $(function() { $backToTopFun(); });
  11. })();
  12. var auxiliaryHost = "https://counter.mayx.eu.org";
  13. $(function(){
  14. $("div#landlord").mouseenter(function(){
  15. $("div.live_ico_box").fadeIn();
  16. });
  17. $("div#landlord").mouseleave(function(){
  18. $("div.live_ico_box").fadeOut();
  19. });
  20. function showHitS(hits){
  21. $.get(auxiliaryHost+"/counter.php?action=show&id="+hits.id,function(data){
  22. hits.innerHTML=Number(data);
  23. });
  24. }
  25. function showHitCount() {
  26. var visitors=$(".visitors-index");
  27. for(var i = 0; i < visitors.length; i++){
  28. showHitS(visitors[i]);
  29. }
  30. }
  31. function addCount() {
  32. var visitors=$(".visitors");
  33. $.get(auxiliaryHost+"/counter.php?action=add&id="+visitors[0].id,function(data){
  34. visitors[0].innerHTML=Number(data);
  35. });
  36. }
  37. if ($('.visitors').length == 1) {
  38. addCount();
  39. } else if ($('.visitors-index').length > 0){
  40. showHitCount();
  41. }
  42. });
  43. today = new Date();
  44. timeold = (today.getTime() - lastUpdated.getTime());
  45. secondsold = Math.floor(timeold / 1000);
  46. e_daysold = timeold / (24 * 60 * 60 * 1000);
  47. daysold = Math.floor(e_daysold);
  48. if (daysold > 90) {
  49. $("html")[0].style = "-webkit-filter: grayscale(100%);filter:progid:DXImageTransform.Microsoft.BasicImage(graysale=1);";
  50. $("html")[0].innerHTML = $("html")[0].innerHTML.replace(/Mayx/g, "Ghost");
  51. console.warn("Mayx may already be Dead");
  52. }
  53. var message_Path = '/Live2dHistoire/live2d/';
  54. var talkAPI = auxiliaryHost+"/talk.php";

Powered by TurnKey Linux.