Sleazy Fork is available in English.

JAV 添加跳转在线观看

[高效寻找最佳的在线资源] 在影片详情页添加跳转在线播放的按钮,并注是否提供在线播放资源或无码资源、字幕资源等信息。支持 JavDB、JavBus 以及 JavLibrary

Verze ze dne 11. 03. 2023. Zobrazit nejnovější verzi.

Autor
mission522
Hodnocení
0 0 0
Verze
1.1.6
Vytvořeno
10. 07. 2021
Aktualizováno
11. 03. 2023
Licence
MIT
Spustit na

// ==UserScript== // @name JAV 添加跳转在线观看 // @namespace https://greasyfork.org/zh-CN/scripts/429173 // @version 1.1.6 // @author mission522 // @description [高效寻找最佳的在线资源] 在影片详情页添加跳转在线播放的按钮,并注是否提供在线播放资源或无码资源、字幕资源等信息。支持 JavDB、JavBus 以及 JavLibrary // @license MIT // @icon https://javdb.com/favicon-32x32.png // @include /^https?:\/\/(\w.)?javdb(\d).com.$/ // @include /^https?:\/\/(\w.)?(javbus|seejav|javsee).(com|cc|me|life).$/ // @include /^https?:\/\/(\w.)?(javlib|javlibrary).com.$/ // @match *:///cn/?v=jav* // @require https://cdn.jsdelivr.net/npm/preact@10.11.3/dist/preact.min.js // @connect jable.tv // @connect missav.com // @connect supjav.com // @connect netflav.com // @connect avgle.com // @connect javhhh.com // @connect bestjavporn.com // @connect javmenu.com // @connect jav.guru // @connect javmost.cx // @connect hayav.com // @connect avjoy.me // @connect javfc2.net // @connect paipancon.com // @connect ggjav.com // @connect av01.tv // @connect javbus.com // @connect javdb.com // @connect javlibrary.com // @connect javdb007.com // @grant GMgetValue // @grant GMsetValue // @grant GM_xmlhttpRequest // ==/UserScript==

((t) => { const o = document.createElement("style"); (o.dataset.source = "vite-plugin-monkey"), (o.innerText = t), document.head.appendChild(o); })( ".jop-list{box-sizing:border-box;display:flex;flex-wrap:wrap;justify-content:flex-start;gap:10px;width:100%;height:100%;z-index:1;background-color:#fff;transition:right .2s ease-in-out;font-family:Roboto,Helvetica,Arial,sans-serif;color:#000}.jop-button,.jop-buttondef{position:relative;display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:3px 10px;border-radius:4px;font-weight:500;font-size:14px;border:1px solid #dcdfe6;color:#606266;cursor:pointer}.jop-buttondef{margin:10px 0;width:100px}.jop-button:visited{color:#606266}.jop-button:hover{text-decoration:none;color:#409eff;border:1px solid #c6e2ff;background-color:#ecf5ff}.jop-buttonlabel{position:absolute;font-size:10px;padding:4px;border-radius:4px;top:-13px;right:-10px;line-height:.75;color:#67c23a;border:1px solid #e1f3d8;background:white}.jop-buttongreen{color:#fff!important;background-color:#67c23a}.jop-buttongreen:hover{color:#fff!important;background-color:#95d475}.jop-buttonred{color:#fff!important;background-color:#f56c6c}.jop-button_red:hover{color:#fff!important;background-color:#f89898}.jop-loading{display:inline-block;width:14px;height:14px;margin-right:10px;border:2px dashed #dcdfe6;border-top-color:transparent;border-radius:100%;animation:btnLoading infinite 1s linear}@keyframes btnLoading{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.jop-tag{padding:3px 6px;color:#409eff!important;background:#ecf5ff;border:1px solid #d9ecff;border-radius:4px}.jop-setting-list{display:flex;flex-wrap:wrap;background-color:#fff}.jop-setting-title{margin:10px 0 5px}.jop-setting-item{display:flex;height:20px;justify-content:center;align-items:center;margin-right:15px;user-select:none;cursor:pointer}.db-panel .movie-panel-info div.panel-block{padding:5.5px 12px}.db-panel .jop-app{padding:15px 12px}.lib-panel .jop-app{padding:20px 30px;margin-top:10px}input[type=checkbox],input[type=radio]{margin:0 0 0 5px;cursor:pointer}", );

(function (preact2) { "use strict"; const matchList = [ { name: "javdb", enable: true, href: /^https:\/\/(\w.)?javdb(\d).com.$/, querys: { panelQueryStr: ".video-meta-panel>.columns.is-desktop .panel.movie-panel-info", codeQueryStr: [data-clipboard-text], }, method() { const columnVideoCover = document.querySelector(".column-video-cover"); columnVideoCover.style.width = "60%"; const panel = document.querySelector( ".video-meta-panel>.columns.is-desktop>.column:not(.column-video-cover)", ); panel.classList.add("db-panel"); }, }, { name: "javbus", enable: true, href: /^https?:\/\/(\w.)?(javbus|seejav|javsee).(com|cc|me|life).$/, querys: { panelQueryStr: ".movie>div.info", codeQueryStr: span[style="color:#CC0000;"], }, method() {}, }, { name: "javlib", enable: true, href: /^https?:\/\/(\w.)?(javlib|javlibrary).com.$/, querys: { panelQueryStr: "#videojacketinfo #videoinfo", codeQueryStr: `#videoid td.text`, }, method() { const panel = document.querySelector("#videoinfo"); panel.classList.add("lib-panel"); }, }, ]; function getCode(cms) { const { codeQueryStr } = cms.querys; const codeNode = document.querySelector(codeQueryStr); if (!codeNode) return ""; const codeText = cms.name === "javdb" ? codeNode.dataset.clipboardText : codeNode.innerText.replace("复制", ""); if (codeText == null ? void 0 : codeText.includes("FC2")) return codeText.split("-")[1]; return codeText; } const style = ""; var t, r, u, i, o$1 = 0, f = [], c = [], e = preact2.options.b, a = preact2.options.r, v = preact2.options.diffed, l = preact2.options.c, m = preact2.options.unmount; function d(t2, u2) { preact2.options.h && preact2.options.h(r, t2, o$1 || u2), (o$1 = 0); var i2 = r.H || (r.H = { _: [], h: [] }); return t2 >= i2..length && i2..push({ __V: c }), i2.[t2]; } function p(n) { return (o$1 = 1), y(B$1, n); } function y(n, u2, i2) { var o2 = d(t++, 2); if ( ((o2.t = n), !o2.c && ((o2. = [ i2 ? i2(u2) : B$1(void 0, u2), function (n2) { var t2 = o2.N ? o2.N[0] : o2.[0], r2 = o2.t(t2, n2); t2 !== r2 && ((o2.N = [r2, o2.[1]]), o2.c.setState({})); }, ]), (o2.c = r), !r.u)) ) { r.u = true; var f2 = r.shouldComponentUpdate; r.shouldComponentUpdate = function (n2, t2, r2) { if (!o2.c.H) return true; var u3 = o2.c.H..filter(function (n3) { return n3.c; }); if ( u3.every(function (n3) { return !n3.N; }) ) return !f2 || f2.call(this, n2, t2, r2); var i3 = false; return ( u3.forEach(function (n3) { if (n3.N) { var t3 = n3.[0]; (n3.__ = n3.N), (n3.N = void 0), t3 !== n3.[0] && (i3 = true); } }), !(!i3 && o2.c.props === n2) && (!f2 || f2.call(this, n2, t2, r2)) ); }; } return o2.N || o2.; } function h(u2, i2) { var o2 = d(t++, 3); !preact2.options.s && z$1(o2.H, i2) && ((o2.__ = u2), (o2.i = i2), r.H.h.push(o2)); } function b() { for (var t2; (t2 = f.shift()); ) if (t2.P && t2.H) try { t2.H.h.forEach(k), t2.H.h.forEach(w$1), (t2.H.h = []); } catch (r2) { (t2.H.h = []), preact2.options.e(r2, t2.v); } } (preact2.options.b = function (n) { (r = null), e && e(n); }), (preact2.options.r = function (n) { a && a(n), (t = 0); var i2 = (r = n.c).H; i2 && (u === r ? ((i2.h = []), (r.h = []), i2..forEach(function (n2) { n2.N && (n2.__ = n2.N), (n2.V = c), (n2.N = n2.i = void 0); })) : (i2.h.forEach(k), i2.h.forEach(w$1), (i2.h = []))), (u = r); }), (preact2.options.diffed = function (t2) { v && v(t2); var o2 = t2.c; o2 && o2.H && (o2.H.h.length && ((1 !== f.push(o2) && i === preact2.options.requestAnimationFrame) || ((i = preact2.options.requestAnimationFrame) || j)(b)), o2.H..forEach(function (n) { n.i && (n.H = n.i), n.V !== c && (n.__ = n.V), (n.i = void 0), (n.V = c); })), (u = r = null); }), (preact2.options.c = function (t2, r2) { r2.some(function (t3) { try { t3.h.forEach(k), (t3.h = t3.h.filter(function (n) { return !n.__ || w$1(n); })); } catch (u2) { r2.some(function (n) { n.h && (n.h = []); }), (r2 = []), preact2.options.e(u2, t3.v); } }), l && l(t2, r2); }), (preact2.options.unmount = function (t2) { m && m(t2); var r2, u2 = t2.c; u2 && u2.H && (u2.H..forEach(function (n) { try { k(n); } catch (n2) { r2 = n2; } }), (u2.H = void 0), r2 && preact2.options.e(r2, u2.v)); }); var g$1 = "function" == typeof requestAnimationFrame; function j(n) { var t2, r2 = function () { clearTimeout(u2), g$1 && cancelAnimationFrame(t2), setTimeout(n); }, u2 = setTimeout(r2, 100); g$1 && (t2 = requestAnimationFrame(r2)); } function k(n) { var t2 = r, u2 = n.c; "function" == typeof u2 && ((n.c = void 0), u2()), (r = t2); } function w$1(n) { var t2 = r; (n.c = n.()), (r = t2); } function z$1(n, t2) { return ( !n || n.length !== t2.length || t2.some(function (t3, r2) { return t3 !== n[r2]; }) ); } function B$1(n, t2) { return "function" == typeof t2 ? t2(n) : t2; } function g(n, t2) { for (var e2 in t2) n[e2] = t2[e2]; return n; } function C(n, t2) { for (var e2 in n) if ("source" !== e2 && !(e2 in t2)) return true; for (var r2 in t2) if ("source" !== r2 && n[r2] !== t2[r2]) return true; return false; } function w(n) { this.props = n; } function R(n, e2) { function r2(n2) { var t2 = this.props.ref, r3 = t2 == n2.ref; return ( !r3 && t2 && (t2.call ? t2(null) : (t2.current = null)), e2 ? !e2(this.props, n2) || !r3 : C(this.props, n2) ); } function u2(e3) { return (this.shouldComponentUpdate = r2), preact2.createElement(n, e3); } return ( (u2.displayName = "Memo(" + (n.displayName || n.name) + ")"), (u2.prototype.isReactComponent = true), (u2.f = true), u2 ); } ((w.prototype = new preact2.Component()).isPureReactComponent = true), (w.prototype.shouldComponentUpdate = function (n, t2) { return C(this.props, n) || C(this.state, t2); }); var x = preact2.options.b; preact2.options.b = function (n) { n.type && n.type.f && n.ref && ((n.props.ref = n.ref), (n.ref = null)), x && x(n); }; var T = preact2.options.e; preact2.options.e = function (n, t2, e2, r2) { if (n.then) { for (var u2, o2 = t2; (o2 = o2.); ) if ((u2 = o2.c) && u2.c) return null == t2.e && ((t2.e = e2.e), (t2.k = e2.k)), u2.c(n, t2); } T(n, t2, e2, r2); }; var I = preact2.options.unmount; function L(n, t2, e2) { return ( n && (n.c && n.c.H && (n.c.H..forEach(function (n2) { "function" == typeof n2.c && n2.c(); }), (n.c.H = null)), null != (n = g({}, n)).c && (n.c.P === e2 && (n.c.P = t2), (n.c = null)), (n.k = n.k && n.k.map(function (n2) { return L(n2, t2, e2); }))), n ); } function U(n, t2, e2) { return ( n && ((n.v = null), (n.k = n.k && n.k.map(function (n2) { return U(n2, t2, e2); })), n.c && n.c.P === t2 && (n.e && e2.insertBefore(n.e, n.d), (n.c.e = true), (n.c.P = e2))), n ); } function D() { (this.u = 0), (this.t = null), (this.b = null); } function F(n) { var t2 = n..c; return t2 && t2.a && t2.a(n); } function V() { (this.u = null), (this.o = null); } (preact2.options.unmount = function (n) { var t2 = n.c; t2 && t2.R && t2.R(), t2 && true === n.h && (n.type = null), I && I(n); }), ((D.prototype = new preact2.Component()).c = function (n, t2) { var e2 = t2.c, r2 = this; null == r2.t && (r2.t = []), r2.t.push(e2); var u2 = F(r2.v), o2 = false, i2 = function () { o2 || ((o2 = true), (e2.R = null), u2 ? u2(l2) : l2()); }; e2.R = i2; var l2 = function () { if (!--r2.u) { if (r2.state.a) { var n2 = r2.state.a; r2.v.k[0] = U(n2, n2.c.P, n2.c.O); } var t3; for (r2.setState({ __a: (r2.b = null) }); (t3 = r2.t.pop()); ) t3.forceUpdate(); } }, c2 = true === t2.h; r2.u++ || c2 || r2.setState({ a: (r2.b = r2.v.k[0]) }), n.then(i2, i2); }), (D.prototype.componentWillUnmount = function () { this.t = []; }), (D.prototype.render = function (n, e2) { if (this.b) { if (this.v.k) { var r2 = document.createElement("div"), o2 = this.v.k[0].c; this.v.k[0] = L(this.b, r2, (o2.O = o2.P)); } this.b = null; } var i2 = e2.a && preact2.createElement(preact2.Fragment, null, n.fallback); return ( i2 && (i2.h = null), [preact2.createElement(preact2.Fragment, null, e2.a ? null : n.children), i2] ); }); var W = function (n, t2, e2) { if ( (++e2[1] === e2[0] && n.o.delete(t2), n.props.revealOrder && ("t" !== n.props.revealOrder[0] || !n.o.size)) ) for (e2 = n.u; e2; ) { for (; e2.length > 3; ) e2.pop()(); if (e2[1] < e2[0]) break; n.u = e2 = e2[2]; } }; ((V.prototype = new preact2.Component()).a = function (n) { var t2 = this, e2 = F(t2.__v), r2 = t2.o.get(n); return ( r2[0]++, function (u2) { var o2 = function () { t2.props.revealOrder ? (r2.push(u2), W(t2, n, r2)) : u2(); }; e2 ? e2(o2) : o2(); } ); }), (V.prototype.render = function (n) { (this.u = null), (this.o = / @PURE / new Map()); var t2 = preact2.toChildArray(n.children); n.revealOrder && "b" === n.revealOrder[0] && t2.reverse(); for (var e2 = t2.length; e2--; ) this.o.set(t2[e2], (this.u = [1, 0, this.u])); return n.children; }), (V.prototype.componentDidUpdate = V.prototype.componentDidMount = function () { var n = this; this.o.forEach(function (t2, e2) { W(n, e2, t2); }); }); var z = ("undefined" != typeof Symbol && Symbol.for && Symbol.for("react.element")) || 60103, B = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, H = "undefined" != typeof document, Z = function (n) { return ( "undefined" != typeof Symbol && "symbol" == typeof Symbol() ? /fil|che|rad/i : /fil|che|ra/i ).test(n); }; (preact2.Component.prototype.isReactComponent = {}), ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function ( t2, ) { Object.defineProperty(preact2.Component.prototype, t2, { configurable: true, get: function () { return this["UNSAFE" + t2]; }, set: function (n) { Object.defineProperty(this, t2, { configurable: true, writable: true, value: n }); }, }); }); var G = preact2.options.event; function J() {} function K() { return this.cancelBubble; } function Q() { return this.defaultPrevented; } preact2.options.event = function (n) { return ( G && (n = G(n)), (n.persist = J), (n.isPropagationStopped = K), (n.isDefaultPrevented = Q), (n.nativeEvent = n) ); }; var nn = { configurable: true, get: function () { return this.class; }, }, tn = preact2.options.vnode; preact2.options.vnode = function (n) { var t2 = n.type, e2 = n.props, u2 = e2; if ("string" == typeof t2) { var o2 = -1 === t2.indexOf("-"); for (var i2 in ((u2 = {}), e2)) { var l2 = e2[i2]; (H && "children" === i2 && "noscript" === t2) || ("value" === i2 && "defaultValue" in e2 && null == l2) || ("defaultValue" === i2 && "value" in e2 && null == e2.value ? (i2 = "value") : "download" === i2 && true === l2 ? (l2 = "") : /ondoubleclick/i.test(i2) ? (i2 = "ondblclick") : /^onchange(textarea|input)/i.test(i2 + t2) && !Z(e2.type) ? (i2 = "oninput") : /^onfocus$/i.test(i2) ? (i2 = "onfocusin") : /^onblur$/i.test(i2) ? (i2 = "onfocusout") : /^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i2) ? (i2 = i2.toLowerCase()) : o2 && B.test(i2) ? (i2 = i2.replace(/[A-Z0-9]/g, "-$&").toLowerCase()) : null === l2 && (l2 = void 0), /^oninput$/i.test(i2) && ((i2 = i2.toLowerCase()), u2[i2] && (i2 = "oninputCapture")), (u2[i2] = l2)); } "select" == t2 && u2.multiple && Array.isArray(u2.value) && (u2.value = preact2.toChildArray(e2.children).forEach(function (n2) { n2.props.selected = -1 != u2.value.indexOf(n2.props.value); })), "select" == t2 && null != u2.defaultValue && (u2.value = preact2.toChildArray(e2.children).forEach(function (n2) { n2.props.selected = u2.multiple ? -1 != u2.defaultValue.indexOf(n2.props.value) : u2.defaultValue == n2.props.value; })), (n.props = u2), e2.class != e2.className && ((nn.enumerable = "className" in e2), null != e2.className && (u2.class = e2.className), Object.defineProperty(u2, "className", nn)); } (n.$$typeof = z), tn && tn(n); }; var en = preact2.options.r; preact2.options.r = function (n) { en && en(n), n.c; }; var _ = 0; function o(o2, e2, n, t2, f2) { var l2, s, u2 = {}; for (s in e2) "ref" == s ? (l2 = e2[s]) : (u2[s] = e2[s]); var a2 = { type: o2, props: u2, key: n, ref: l2, _k: null, _: null, _b: 0, _e: null, _d: void 0, _c: null, _h: null, constructor: void 0, _v: --, _source: f2, _self: t2, }; if ("function" == typeof o2 && (l2 = o2.defaultProps)) for (s in l2) void 0 === u2[s] && (u2[s] = l2[s]); return preact2.options.vnode && preact2.options.vnode(a2), a2; } const Setting = ({ siteList: siteList2, setDisables, disables }) => { const [showSetting, setShowSetting] = p(false); const changeCheck = (item, isHidden) => { if (isHidden) { setDisables(disables.filter((disItem) => disItem !== item.name)); } else { setDisables([...disables, item.name]); } }; return o(preact2.Fragment, { children: [ !showSetting ? o("div", { className: "jop-buttondef", onClick: () => { setShowSetting(!showSetting); }, children: "设置", }) : o("h4", { className: "jop-setting-title", children: "勾选默认显示的网站", }), showSetting && o(preact2.Fragment, { children: [ o("div", { className: "jop-setting", children: o("div", { className: "jop-setting-list", children: siteList2.map((item) => { const isHidden = disables.includes(item.name); return o("div", { className: "jop-setting-item", onClick: () => { changeCheck(item, isHidden); }, children: [ item.name, o("input", { type: "checkbox", className: "jop-setting-checkbox", checked: !isHidden, }), ], }); }), }), }), o("div", { className: "jop-buttondef", onClick: () => { setShowSetting(!showSetting); }, children: "收起设置", }), ], }), ], }); }; var monkeyWindow = window; var GM_setValue = / @PURE / (() => monkeyWindow.GMsetValue)(); var GMxmlhttpRequest = / @PURE / (() => monkeyWindow.GMxmlhttpRequest)(); var GMgetValue = / @PURE */ (() => monkeyWindow.GMgetValue)(); function videoPageParser(responseText, { subQuery, leakQuery, videoQuery }) { const doc = new DOMParser().parseFromString(responseText, "text/html"); const subNode = subQuery ? doc.querySelector(subQuery) : ""; const subNodeText = subNode ? subNode.innerHTML : ""; const leakNode = leakQuery ? doc.querySelector(leakQuery) : null; const videoNode = videoQuery ? doc.querySelector(videoQuery) : true; return { isSuccess: !!videoNode, hasSubtitle: subNodeText.includes("字幕") || subNodeText.includes("subtitle"), hasLeakage: !!leakNode, }; } function serachPageParser( responseText, { linkQuery, titleQuery, listIndex = 0, spaceCode = false, checkFn: checkTextFn }, siteHostName, CODE, ) { const doc = new DOMParser().parseFromString(responseText, "text/html"); const linkNode = linkQuery ? doc.querySelectorAll(linkQuery)[listIndex] : null; const titleNode = titleQuery ? doc.querySelectorAll(titleQuery)[listIndex] : null; const titleNodeText = titleNode ? (titleNode == null ? void 0 : titleNode.outerHTML) : ""; const formatCode = spaceCode ? CODE.replace("-", " ") : CODE; const isSuccess = linkNode && titleNode && titleNodeText.includes(formatCode); if (isSuccess) { const targetLinkText = linkNode.href.replace(linkNode.hostname, siteHostName); const checkResult = checkTextFn ? checkTextFn(targetLinkText) : false; const hasSubtitle = titleNodeText.includes("字幕") || titleNodeText.includes("subtitle") || checkResult; return { isSuccess: true, targetLink: targetLinkText, hasLeakage: titleNodeText.includes("无码") || titleNodeText.includes("Uncensored"), hasSubtitle, }; } else { return { targetLink: "", isSuccess: false, hasSubtitle: false, hasLeakage: false, }; } } function xhr(siteItem, targetLink, CODE) { const xhrPromise = new Promise((resolve) => { GMxmlhttpRequest({ method: "GET", url: targetLink, onload: (response) => { if (siteItem.fetcher === "get") { if (response.status === 404) { resolve({ isSuccess: false, targetLink, hasSubtitle: false, hasLeakage: false, msg: "应该是没有资源", }); } else { const { hasSubtitle, hasLeakage, isSuccess } = videoPageParser( response.responseText, siteItem.domQuery, ); resolve({ isSuccess, targetLink, hasSubtitle, hasLeakage, msg: "[get],存在资源", }); } } else if (siteItem.fetcher === "parser") { const { targetLink: targetLink2, isSuccess, hasLeakage, hasSubtitle, } = serachPageParser(response.responseText, siteItem.domQuery, siteItem.hostname, CODE); resolve({ isSuccess, targetLink: isSuccess ? targetLink2 : targetLink2, hasSubtitle, hasLeakage, msg: "[parser]存在资源", }); } }, onerror: (error) => { resolve({ isSuccess: false, targetLink, hasSubtitle: false, hasLeakage: false, msg: error.error, }); }, }); }); return xhrPromise; } const SiteBtn = R(({ siteItem, CODE }) => { const { name } = siteItem; const link = siteItem.url.replace("{{code}}", CODE); const [status, setStatus] = p({ isSuccess: "pedding", hasSubtitle: false, hasLeakage: false, targetLink: "", }); const { isSuccess, hasSubtitle, hasLeakage, targetLink } = status; h(() => { xhr(siteItem, link, CODE).then((res) => { setStatus({ isSuccess: res.isSuccess ? "fulfilled" : "rejected", hasSubtitle: res.hasSubtitle, hasLeakage: res.hasLeakage, targetLink: res.targetLink, }); }); }, [xhr, siteItem, CODE, link]); const colorClass = isSuccess === "pedding" ? " " : isSuccess === "fulfilled" ? "jop-buttongreen " : "jop-buttonred "; return o("a", { className: "jop-button " + colorClass, target: "blank", href: targetLink === "" ? link : targetLink, children: [ (hasSubtitle || hasLeakage) && o("div", { className: "jop-buttonlabel", children: [ hasSubtitle && o("span", { children: "字幕 ", }), hasLeakage && o("span", { children: " 无码", }), ], }), o("span", { children: name, }), ], }); }); const print = (name) => { console.log(name); }; const siteList = [ { name: "Jable", disable: false, hostname: "jable.tv", url: "https://jable.tv/search/{{code}}/", fetcher: "parser", domQuery: { linkQuery: .container .detail>.title>a, titleQuery: .container .detail>.title>a, checkFn: (linkResult) => /-c\/$/.test(linkResult), }, method: print, }, { name: "MISSAV", disable: false, hostname: "missav.com", url: "https://missav.com/{{code}}/", fetcher: "get", domQuery: { subQuery: '.space-y-2 a.text-nord13[href="https://missav.com/chinese-subtitle"]', leakQuery: ".order-first div.rounded-md a[href]:last-child", }, method: print, }, { name: "Supjav", disable: false, hostname: "supjav.com", url: "https://supjav.com/zh/?s={{code}}", fetcher: "parser", domQuery: { linkQuery: .posts.clearfix>.post>a.img[title], titleQuery: h3>a[rel="bookmark"][itemprop="url"], }, method: print, }, { name: "NETFLAV", disable: false, hostname: "netflav.com", url: "https://netflav.com/search?type=title&keyword={{code}}", fetcher: "parser", domQuery: { linkQuery: ".gridcell>a", titleQuery: ".gridcell>a>.gridtitle", }, method: print, }, { name: "Avgle", disable: false, hostname: "avgle.com", url: "https://avgle.com/search/videos?searchquery={{code}}&searchtype=videos", fetcher: "parser", domQuery: { linkQuery: ".container>.row .row .well>a[href]", titleQuery: ".container>.row .row .well .video-title", }, method: print, }, { name: "JAVHHH", disable: false, hostname: "javhhh.com", url: "https://javhhh.com/v/?wd={{code}}", fetcher: "parser", domQuery: { linkQuery: ".typelist>.i-container>a[href]", titleQuery: ".typelist>.i-container>a[href]", }, method: print, }, { name: "BestJP", disable: false, hostname: "bestjavporn.com", url: "https://www3.bestjavporn.com/search/{{code}}", fetcher: "parser", domQuery: { linkQuery: "article.thumb-block>a", titleQuery: "article.thumb-block>a", }, method: print, }, { name: "JAVMENU", disable: false, hostname: "javmenu.com", url: "https://javmenu.com/{{code}}", fetcher: "get", domQuery: { videoQuery: "a.nav-link[aria-controls='pills-0']", }, method: print, }, { name: "Jav.Guru", disable: false, hostname: "jav.guru", url: "https://jav.guru/?s={{code}}", fetcher: "parser", domQuery: { linkQuery: ".imgg>a[href]", titleQuery: ".inside-article>.grid1 a[title]", }, method: print, }, { name: "JAVMOST", disable: false, hostname: "javmost.cx", url: "https://javmost.cx/search/{{code}}/", fetcher: "parser", domQuery: { linkQuery: "#content .card a#MyImage", titleQuery: "#content .card-block .card-title", }, method: print, }, { name: "HAYAV", disable: false, hostname: "hayav.com", url: "https://hayav.com/video/{{code}}/", fetcher: "get", domQuery: {}, method: print, }, { name: "AvJoy", disable: false, hostname: "avjoy.me", url: "https://avjoy.me/search/video/{{code}}", fetcher: "parser", domQuery: { titleQuery: .content-info>.content-title, linkQuery: .content-row>a, }, method: print, }, { name: "JAVFC2", disable: false, hostname: "javfc2.net", url: "https://javfc2.net/?s={{code}}", fetcher: "parser", domQuery: { linkQuery: "article.loop-video>a[href]", titleQuery: "article.loop-video .entry-header", }, method: print, }, { name: "baihuse", disable: false, hostname: "paipancon.com", url: "https://paipancon.com/search/{{code}}", fetcher: "parser", domQuery: { linkQuery: "div.col>div.card>a[href]", titleQuery: "div.card img.card-img-top", }, method: print, }, { name: "GGJAV", disable: false, hostname: "ggjav.com", url: "https://ggjav.com/main/search?string={{code}}", fetcher: "parser", domQuery: { listIndex: 1, spaceCode: true, titleQuery: "div.columns.large-3.medium-6.small-12.item.float-left>div.itemtitle>a.graya", linkQuery: "div.columns.large-3.medium-6.small-12.item.float-left>div.itemtitle>a.graya", }, method: print, }, { name: "AV01", disable: false, hostname: "av01.tv", url: "https://www.av01.tv/search/videos?searchquery={{code}}", fetcher: "parser", domQuery: { linkQuery: "div[id].well-sm>a", titleQuery: ".video-views>.pull-left", }, method: print, }, { name: "JavBus", disableHostname: "javbus", disable: false, hostname: "javbus.com", url: "https://javbus.com/{{code}}", fetcher: "get", domQuery: {}, method: print, }, { name: "JavDB", disableHostname: "javdb", disable: false, hostname: "javdb.com", url: "https://javdb.com/search?q={{code}}", fetcher: "parser", domQuery: { linkQuery: ".movie-list>.item:first-child>a", titleQuery: ".video-title", }, method: print, }, { name: "JAVLib", disableHostname: "javlibrary", disable: false, hostname: "javlibrary.com", url: "https://www.javlibrary.com/cn/vlsearchbyid.php?keyword={{code}}", fetcher: "get", domQuery: {}, method: print, }, ]; const App = R(function ({ current, CODE }) { const defDisables = ["AvJoy", "baihuse", "GGJAV", "AV01", "JavBus", "JavDB", "JAVLib"]; const [disables, setDisables] = p(GMgetValue("disable", defDisables)); return o(preact2.Fragment, { children: [ o("div", { class: "jop-list", children: siteList.map((item) => { const hidden = disables.find((disItem) => disItem === item.name) === void 0; if (hidden && current.name !== item.disableHostname) { return o( SiteBtn, { siteItem: item, CODE, }, item.name, ); } else { return o(preact2.Fragment, {}); } }), }), o("div", { children: o(Setting, { siteList, setDisables: (disable) => { setDisables(disable); GM_setValue("disable", disable); }, disables, }), }), ], }); }); function main() { const current = matchList.find((item) => item.href.test(window.location.href)); const CODE = getCode(current); current.method(); const panel = document.querySelector(current.querys.panelQueryStr); if (panel === null) return; const app = document.createElement("div"); app.classList.add("jop-app"); panel.append(app); preact2.render( o(App, { current, CODE, }), app, ); } main(); })(preact);