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.

46 lines
1.7 KiB

  1. var message_Path = '/Live2dHistoire/live2d/';
  2. var talkAPI = BlogAPI + "/ai_chat";
  3. (function () {
  4. var $backToTopTxt = "返回顶部", $backToTopEle = $('<div class="backToTop"></div>').appendTo($("body"))
  5. .text($backToTopTxt).attr("title", $backToTopTxt).click(function () {
  6. $("html, body").animate({ scrollTop: 0 }, 120);
  7. }), $backToTopFun = function () {
  8. var st = $(document).scrollTop(), winh = $(window).height();
  9. (st > 0) ? $backToTopEle.show() : $backToTopEle.hide();
  10. };
  11. $(window).bind("scroll", $backToTopFun);
  12. $(function () { $backToTopFun(); });
  13. })();
  14. $(function () {
  15. function showHitCount() {
  16. $(".visitors-index").each(function() {
  17. var $elem = $(this);
  18. $.get(BlogAPI + "/count_click?id=" + $elem.attr('id'), function(data) {
  19. $elem.text(Number(data));
  20. });
  21. });
  22. }
  23. function addCount() {
  24. var $visitor = $(".visitors:first");
  25. $.get(BlogAPI + "/count_click_add?id=" + $visitor.attr('id'), function(data) {
  26. $visitor.text(Number(data));
  27. });
  28. }
  29. if ($('.visitors').length == 1) {
  30. addCount();
  31. } else if ($('.visitors-index').length > 0) {
  32. showHitCount();
  33. }
  34. });
  35. today = new Date();
  36. timeold = (today.getTime() - lastUpdated.getTime());
  37. secondsold = Math.floor(timeold / 1000);
  38. e_daysold = timeold / (24 * 60 * 60 * 1000);
  39. daysold = Math.floor(e_daysold);
  40. if (daysold > 90) {
  41. $("html")[0].style = "-webkit-filter: grayscale(100%);filter:progid:DXImageTransform.Microsoft.BasicImage(graysale=1);";
  42. $("html")[0].innerHTML = $("html")[0].innerHTML.replace(/Mayx/g, "Ghost");
  43. console.warn("Mayx may already be Dead");
  44. }

Powered by TurnKey Linux.