SLive Core (IntUpdate)

SLive Userscript Core

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.gf.qytechs.cn/scripts/400082/789873/SLive%20Core%20%28IntUpdate%29.js

  1. // ==UserScript==
  2. // @name SLive Core (IntUpdate)
  3. // @namespace http://tampermonkey.net/
  4. // @version 21
  5. // @match https://shikimori.one/*
  6. // @match https://shikimori.org/*
  7. // @match https://*.shikimorilive.top/*
  8. // @match http://shikimorilive.test/*
  9. // @description SLive Userscript Core
  10. // @author JuniorDEV
  11. // ==/UserScript==
  12.  
  13. var version = 21;
  14. //alert('Update123');
  15.  
  16. /*var observer = new MutationObserver(function(e) {
  17. if (document.location.href.indexOf("animes") < 1) return !1;
  18. 5 < e.length && Run()
  19. });*/
  20.  
  21. function Run() {
  22. var e = detectIE();
  23. e && e < 11 && (alert("Oh nooo -_- Пожалуйста установите браузер или используйте IE Edge"), document.location.href = "https://www.srware.net/iron/");
  24. var t = document.querySelectorAll(".b-anime_status_tag")[0];
  25. if (!t.classList.contains("ongoing") && !t.classList.contains("released")) return !1;
  26. if ("complete" != document.readyState) window.setTimeout(Run, 100);
  27. else var n = setInterval(function() {
  28. if (document.body.classList.contains("p-animes-show") && 0 == document.querySelectorAll(".slPlayFreePlayButton").length) {
  29. var i = document.location.href.split("/")[4].split("-")[0];
  30. var e = document.createElement("div");
  31. e.classList.add("block"), e.classList.add("slPlayFreePlayButton"), e.innerHTML = '<a style="border: 1px solid #4c86c8!important; background-color: #daf1ff!important; color: #4c86c8!important; margin-top: 15px;" class="b-link_button dark watch_link watch-online" href="https://live.shikimorilive.top/online/' + i + '/1">Смотреть онлайн на Shikimøri Live<br><span style="color: green; padding-top: 4px;">(Бесплатно)</span></a>', document.querySelectorAll(".c-info-right")[0].appendChild(e)
  32. } else clearInterval(n)
  33. }, 1e3)
  34. }
  35.  
  36. function detectIE() {
  37. var e = window.navigator.userAgent,
  38. t = e.indexOf("MSIE ");
  39. if (0 < t) return parseInt(e.substring(t + 5, e.indexOf(".", t)), 10);
  40. if (0 < e.indexOf("Trident/")) {
  41. var n = e.indexOf("rv:");
  42. return parseInt(e.substring(n + 3, e.indexOf(".", n)), 10)
  43. }
  44. var r = e.indexOf("Edge/");
  45. return 0 < r && parseInt(e.substring(r + 5, e.indexOf(".", r)), 10)
  46. }
  47. /*observer.observe(document, {
  48. attributes: !1,
  49. childList: !0,
  50. characterData: !1,
  51. subtree: !0
  52. }),
  53. function() {
  54. if (document.location.href.indexOf("animes") < 1) return;
  55. Run()
  56. }();*/
  57.  
  58. // Thanks about the idea - ImoutoChan
  59. function runme(runfn) {
  60. document.addEventListener('turbolinks:load', runfn);
  61. document.addEventListener('page:load', runfn);
  62.  
  63. if (document.attachEvent ? document.readyState === "complete" : document.readyState !== "loading"){
  64. runfn();
  65. } else {
  66. document.addEventListener('DOMContentLoaded', runfn);
  67. }
  68. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址