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
2.0 KiB

  1. var BlogAPI = "https://summary.mayx.eu.org";
  2. (function () {
  3. var $backToTopTxt = "返回顶部", $backToTopEle = $('<div class="backToTop"></div>').appendTo($("body"))
  4. .text($backToTopTxt).attr("title", $backToTopTxt).click(function () {
  5. $("html, body").animate({ scrollTop: 0 }, 120);
  6. }), $backToTopFun = function () {
  7. var st = $(document).scrollTop(), winh = $(window).height();
  8. (st > 0) ? $backToTopEle.show() : $backToTopEle.hide();
  9. };
  10. $(window).bind("scroll", $backToTopFun);
  11. $(function () { $backToTopFun(); });
  12. })();
  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(BlogAPI + "/count_click?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(BlogAPI + "/count_click_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 = BlogAPI + "/ai_chat";

Powered by TurnKey Linux.