od.js

Turn on old driver mode for HacgGodTurn

Este script no debería instalarse directamente. Es una biblioteca que utilizan otros scripts mediante la meta-directiva de inclusión // @require https://update.sleazyfork.org/scripts/23522/1002023/odjs.js

  1. function processTxt(e) { var t, r = e;
  2. r && (r = r.replace(regObj.bdshare, linkArr.baidu), r = r.replace(regObj.bdshare1, linkArr.baidu), e = r, r = r.replace(/ *-?本站暂?不再?提供(文件)?下载-? */i, "").replace(/ *保护作者版权 */i, "").replace(/ *请支持正版 */i, "").replace(/\<\!--[^>]*>/g, ""), r = /^(magnet|bdcloud) /i.test(r) ? r : r.replace(/([a-z0-9]{5,}) +([a-z0-9]{5,})/g, "$1$2"), t = r, r = !/a\shref="magnet:|md5/i.test(r) ? r.replace(regObj.btih, linkArr.btih) : r, r = r.replace(regObj.yunpan, linkArr.yunpan), r = r.replace(regObj.howfile, linkArr.howf), r = r.replace(regObj.tcn, linkArr.tcn), r = r.replace(regObj.yyw, linkArr.yyw), r = r.replace(regObj.mega, linkArr.mega), r = r.replace(regObj.pixiv, linkArr.pixiv), r = r.replace(/(baidu\.com\/s\/[a-z\d]{7,23})#([\'\"])/gi, "$1$2"), r = r.replace(regObj.xunlei, linkArr.xunlei));
  3. if (t != r) return r;
  4. else return e;
  5. }
  6.  
  7. function extCode(e) {
  8. return text = e.textContent.trim(), simpleRule.test(text) ? text.match(simpleRule)[1] : codeRule.test(text) ? text.match(codeRule)[1] : ""
  9. }
  10.  
  11. function seriousReplace(e) {
  12. let t = document.getElementsByClassName(e);
  13. for (let r in t)
  14. t[r] && t[r].innerHTML && (t[r].innerHTML = t[r].innerHTML.replace(/&nbsp;/g," ").replace(/(\s|^|:|<p>|[\u2E80-\u9FFF])(?:https?:\/\/pan\.baidu\.com)?(?:\/?s\/)?(1[0-9a-zA-Z_\-]{6,22})\b(?:\s*(?:<br\s*\/?>)?\s*(?:密码[::]?|pw:|[pP]|钥匙|提取码?:?)?\s*([a-z0-9A-Z]{4}\b|[^\s,,::\<\>]{2,4})\s*(<br\s*\/?>|<\/p>|$| +))/g, linkArr.baidu).replace(/(\s|^|:|<p>|[\u2E80-\u9FFF])(?:https?:\/\/pan\.baidu\.com\/)?(?:\/?s\/)(1[0-9a-zA-Z_\-]{6,22})\b\s*(<br\s*\/?>|<\/p>|$)/g, "$1<a href='http://pan.baidu.com/s/$2' target='_blank'>度娘:$2</a> $3 ").replace(regObj.yyw, linkArr.yyw).replace(regObj.tcn, linkArr.tcn), t[r].innerHTML = !/a\shref="magnet:|md5/i.test(t[r].innerHTML) ? t[r].innerHTML.replace(regObj.btih, linkArr.btih) : t[r].innerHTML)
  15. }
  16.  
  17. function hashFunc(e) {
  18. return hashWord = e.match(/^\W*/g)[0], e = e.replace(/[\s\W]*/g, "").toUpperCase(), hashStart = e.slice(0, 2), hashEnd = e.slice(-2), [hashStart, hashEnd, e, hashWord]
  19. }
  20.  
  21. function addInsertHandler(e) { var t = !1;
  22. document.addEventListener("DOMNodeInserted", function() {
  23. if ("complete" == document.readyState && !t) {
  24. t = !0; var r = 0,
  25. a = setInterval(function() {
  26. 1 == r ? changeUrl(!1, e) : 2 == r && (t = !1, clearInterval(a)), r++
  27. }, 500)
  28. }
  29. }), changeUrl(!0, e) }
  30.  
  31. function changeUrl(e, t) {
  32. for (var r = e ? t[0] : ["a", "img"], a = 0, i = r.length; i > a; a++)
  33. for (var n = r[a], s = document.querySelectorAll(n), o = 0, l = s.length; l > o; o++)
  34. for (var p = 0, h = t[1].length; h > p; p++) {
  35. var c = new RegExp(t[1][p][0], "gi");
  36. if (n == "a") {
  37. c.test(s[o].href) && (s[o].href = s[o].href.replace(c, t[1][p][1]))
  38. } else if (n == "img") {
  39. c.test(s[o].src) && (s[o].src = s[o].src.replace(c, t[1][p][1]))
  40. } else {
  41. s[o].parentNode && c.test(s[o].outerHTML) && (s[o].outerHTML = s[o].outerHTML.replace(c, t[1][p][1]))
  42. }
  43. }
  44. }
  45. var simpleRule = /(?:提取|访问)[码碼]?\s*[::\s]?\s*([a-z\d]{4})/i,
  46. codeRule = /(?:(?:提取|钥匙|访问|密[码碼]|艾|Extracted-code|说明|code[::][“"]?)密?[码碼]?[为是]?)\s*[::\s]?\s*([a-z\d]{4}|[^\s,,::]{2,4})(\s|\b|$)/i,
  47. regObj = {
  48. btih: /(?:magnet:\?xt=urn:btih)?((?:[^\/=\|\"]|^)\s*\b)([a-f0-9]{40}|[a-z0-9]{32})\b([^#]|$)/gi,
  49. bdshare: /(\b|^)(?:b?\/?s\/|.*度.*[::]|BDcloud *|(?:https?:\/\/)?\s*p\s*a\s*n\s*\.\s*b\s*a\s*i\s*d\s*u\s*\.\s*c?\s*o\s*m\s*\/\s*s\s*\/\s*)(1[0-9a-zA-Z_\-]{6,22})\b(?:\s*(?:.*?[::]\s*)?([a-zA-Z0-9]{4}(\b|\s|$)|[^\s,,::\<\>]{2}(\s|$)))?/g,
  50. bdshare1: /(^|:|:|\n|BDcloud *)\s*(1[0-9a-zA-Z_\-]{6,22})\b(?:\s*(?:[::\/]\s*)?([a-zA-Z0-9]{4}|[^\s,,::\<\>]{2}))/g,
  51. xunlei: /\b(QUF[a-zA-Z0-9\=]+)/g,
  52. howfile: /@?(?:HF|howfile)(?:\.com)?\/file\/(\w{4,10})\/(\w{8,})\/?/gi,
  53. tcn: /\bt\/(\w{7})/g,
  54. yyw: /(\/lb\/)?(5lb[a-zA-Z0-9]{8,12})/g,
  55. mega: /(?:https?:\/\/mega)?(?:\.co)?(\.nz\s*\/(#[a-zA-Z0-9_!\-]{22,}(\n[a-zA-Z0-9_!\-]+\n)?))/g,
  56. yunpan: /((?:https:\/\/)?yunpan.cn\/([a-zA-Z0-9]+))/g,
  57. pixiv: /(?:封面|\s|:|:|^)id[=;](\d+)/gi
  58. },
  59. linkArr = [];
  60. linkArr.btih = '$1<a href="magnet:?xt=urn:btih:$2" >磁链</a> → <a href="https://itorrents.org/torrent/$2.torrent" target="_blank" title="点击下载种子文件">【种子】</a>+<a href="https://btsow.rest/magnet/detail/hash/$2" target="_blank" title="支持Base32,可查看种子内容">【详情】</a>', linkArr.baidu = "$1<a href='http://pan.baidu.com/s/$2#$3' target='_blank'>度娘[$2]</a> $3 ", linkArr.yunpan = "<a href='$1' target='_blank'>云盘:$2</a>", linkArr.howf = "<a href='http://howfile.com/file/$1/$2/' target='_blank'>好盘:howfile.com/file/$1/$2</a>", linkArr.tcn = "<a href='http://t.cn/$1' target='_blank'>短链:t.cn/$1</a>", linkArr.yyw = "<a href='http://115.com/lb/$2' target='_blank'>115礼包:$2</a> ", linkArr.mega = "<a href='https://mega.co$1' target='_blank'>MEGA网盘</a>\n", linkArr.xunlei = "<a href='thunder://$1' target='_blank'>吸血雷</a>", linkArr.pixiv = "<a href='http://www.pixiv.net/member_illust.php?mode=medium&illust_id=$1' target='_blank'>Pixiv原图</a>";
  61. var nod = document.createElement("style"),
  62. str = ".oD_box{position:fixed;top:60px;right:0px;width:40px;transition: all 0.2s ease;white-space:nowrap;z-index:99998} .oD_box:hover{width:290px} .oD_sel{-ms-transform-origin: 50% 0%;-webkit-transform-origin: 50% 0%;transform-origin: 50% 0%;transform:scale(1.1,1.1);-ms-transform:scale(1.1,1.1);-moz-transform:scale(1.1,1.1);-webkit-transform:scale(1.1,1.1);-o-transform:scale(1.1,1.1);transition: all 1s ease;}";
  63. nod.type = "text/css", nod.styleSheet ? nod.styleSheet.cssText = str : nod.innerHTML = str;
  64. var rocketStr = '<div id="rocketContent" style="display: none;"><div style="height:100%; width:100%; position:fixed; _position:absolute; top:0; z-index:99999; opacity:0.3; filter: alpha(opacity=30); background-color:#000"></div><div style="width:300px;height:300px;position:fixed;left:50%;top:50%;margin-top:-150px;margin-left:-150px;z-index:100000;background-color:#ffffff;border:1px solid #afb3b6;border-radius:10px;opacity:0.95;filter:alpha(opacity=95);box-shadow:5px 5px 20px 0px #000;"><div id="rocketLinks" style="position:absolute;left:20px;top:20px;height:260px;width:260px;overflow:auto;word-wrap:break-word;"></div><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAMAAAAM7l6QAAAA5FBMVEUAAAD+/v7////9/f7////////+/v7+/v7////+/v7+/v7////+/v7+/v7////+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7////////////+/v7+/v7+/v7+/v7+/v4uje3///82ke7s9P3N5PtQoPDI4fqCu/Tu9v5Im+/6/P+VxfZgqPFNnvDp8/3f7fq42Pmnz/d1tPNvsfNkq/JCmO/4+/7X6fz19/rn8PqYx/aNwfV8uPRqrvJZpfFUovAzkO3Q5vu92/mr0fieyva92fWx0vQ6lO5pygFTAAAAJHRSTlMAmfD+RMGwgj2mknlIKR/36+XGnIyHfnJfVDk2My8S4E1CJBvTatKDAAABY0lEQVQoz4WSZ1fCMBRA05ahLPfemkspBUFwgGz3+P//x/hK6ZBzvB/ak96+kZeoGCtFK5eziitqCSfWOnM2CuWUrOyQYPc0bjM2htHXh+/ffQ4lQ6zEPoZ6TwdUp10M56EtAe5MR7y0HGAeX7Ghe6MTzIZwFtTfBrepUzw4UFSGY8CUTTMGLo3eglv58By21pRnB7aNBqTwPfWq/OVey9sH22wZXiWo6Yr3GtRl/f0IRyoPYy14v97YWjVY12BPrcK9XvhaZPUdWCoLbR35yOoW5P7R8eQ3JrmbSp6HVmSrXuTrmNYyUAs2JkL6D6YjG1PgNGXK87F4nWAsUxmL2gyH6oVD7cuhdqFg9CE4T/oPE6CsgvBOP21715AP7ugaDFK+3YD1KyUcAG47bn0TSylxFd8WDTwMMByoBSUHw+jd9/3JbQODnVExygUS7FRUksPVtdDZW8dqCZm8lc1auxcq4gc02GVGTUchmgAAAABJRU5ErkJggg==" id="rocketQuit" style="position:absolute;right:0px;top:0px;cursor: pointer;"/></div></div>';
  65.  
  66. function elementPosition(o) {
  67. let t = 0,
  68. e = 0;
  69. if (o.offsetParent)
  70. for (t = o.offsetLeft, e = o.offsetTop; o.offsetParent;) o = o.offsetParent, t += o.offsetLeft, e += o.offsetTop;
  71. return {
  72. x: t,
  73. y: e
  74. }
  75. }
  76.  
  77.  
  78. var repeatCount = 0,
  79. cTimeout;
  80.  
  81. function scrollToControl(o) {
  82. let t = o;
  83. t -= (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0);
  84. let e = t % 50,
  85. r = (t - e) / 50;
  86. window.scrollBy(0, e), scrollSmoothly(t, r, o)
  87. }
  88.  
  89. function scrollSmoothly(o, t, a) {
  90. let e = 50;
  91. return 0 > t && (e = -50), repeatCount < Math.abs(t) ? (window.scrollBy(0, e), repeatCount++, void(cTimeout = setTimeout(function() {
  92. scrollSmoothly(o, t, a)
  93. }, 10))) : (void clearTimeout(cTimeout), repeatCount = 0, window.scrollTo(0, a))
  94. }