// ==UserScript== // @name 视频收藏助手 - 跨站联合版 // @namespace FBin001-JVideoCollector // @version 1.0.16 // @description 视频收藏助手 - 跨站联合版,支持低端影视、厂长资源、嘀嗒影视、韩剧tv、LIBVIO、修罗影视、毒蛇电影、韩剧网、注视影视等影视站点收藏工具 // @author FBin001 // @match *://*.didahd.xyz/* // @match *://*.4kcz.com/* // @match *://*.czzy.top/* // @match *://*.cz4k.com/* // @match *://*.hantv.net/* // @match *://*.hantvz.com/* // @match *://*.ddys.app/* // @match *://*.ddys.ai/* // @match *://*.libvio.host/* // @match *://*.libvio.mov/* // @match *://*.libvios.com/* // @match *://*.libhd.com/* // @match *://*.libviobd.com/* // @match *://*.libvio.in/* // @match *://*.v.xl.in.ua/* // @match *://*.v.xl01.eu.cc/* // @match *://*.v.xl02.eu.cc/* // @match *://*.v.xl01.cc.ua/* // @match *://*.duse2.com/* // @match *://*.duse3.com/* // @match *://*.duse4.com/* // @match *://*.dushe3.app/* // @match *://*.hanju.com/* // @match *://*.gaze.red/* // @match *://*.gazes.store/* // @match *://*.gazes.top/* // @match *://*.gaze.show/* // @match *://*.gazes.host/* // @include /^https?:\/\/([^/]*\.)?didahd\./ // @include /^https?:\/\/([^/]*\.)?(4kcz|czzy|cz4k)\./ // @include /^https?:\/\/([^/]*\.)?hantvz?\./ // @include /^https?:\/\/([^/]*\.)?ddys\./ // @include /^https?:\/\/([^/]*\.)?(libvio|libvios|libviobd|libhd)\./ // @include /^https?:\/\/([^/]*\.)?xl\d*\./ // @include /^https?:\/\/([^/]*\.)?dush?e\d+\./ // @include /^https?:\/\/([^/]*\.)?hanju\./ // @include /^https?:\/\/([^/]*\.)?gazes?\d*\./ // @connect www.didahd.xyz // @connect www.4kcz.com // @connect czzy.top // @connect www.cz4k.com // @connect hantv.net // @connect www.hantv.net // @connect hantvz.com // @connect www.hantvz.com // @connect ddys.app // @connect ddys.ai // @connect libvio.host // @connect www.libvio.mov // @connect www.libvios.com // @connect www.libhd.com // @connect libviobd.com // @connect www.libvio.in // @connect v.xl.in.ua // @connect v.xl01.eu.cc // @connect v.xl02.eu.cc // @connect v.xl01.cc.ua // @connect www.duse2.com // @connect www.duse3.com // @connect www.duse4.com // @connect www.hanju.com // @connect hanju.com // @connect gaze.red // @connect gazes.store // @connect gazes.top // @connect gaze.show // @connect gazes.host // @connect gitee.com // @connect raw.giteeusercontent.com // @noframes true // @license MIT // @grant GM_setValue // @grant GM_getValue // @grant GM_addValueChangeListener // @grant GM_registerMenuCommand // @grant GM_xmlhttpRequest // @run-at document-start // ==/UserScript== (()=>{var tr=Object.defineProperty; var o=(t,e)=>tr(t,"name",{value:e,configurable:true}); var de={id:"dida",name:"\u5600\u55D2\u5F71\u89C6",domains:["www.didahd.xyz"],matches:["*://*.didahd.xyz/*"],include:["/^https?:\\/\\/([^/]*\\.)?didahd\\./"],searchPath:o(t=>"/search/-------------.html?wd="+encodeURIComponent(t),"searchPath"),pageType(){const t=location.pathname;if(t.startsWith("/detail/"))return"detail";if(t.startsWith("/play/"))return"play";if(t.startsWith("/search/"))return"search";if(document.querySelector(".myui-vodlist"))return"list";return"other"},listCardSelector:".myui-vodlist__box, #searchList li",getListCards(){const t=[];const e=new Set;document.querySelectorAll(".myui-vodlist__box").forEach(n=>{var l;if(e.has(n))return;const r=n.querySelector("a.myui-vodlist__thumb");if(!r)return;const a=(r.getAttribute("title")||"").trim();const c=r.getAttribute("data-original")||((l=r.querySelector("img"))==null?void 0:l.src)||"";if(a){e.add(n);t.push({element:n,name:a,cover:c,path:r.pathname})}});document.querySelectorAll("#searchList li").forEach(n=>{var m;if(e.has(n))return;const r=n.querySelector("a.myui-vodlist__thumb");if(!r)return;const a=n.querySelector("a.searchkey");const c=((a==null?void 0:a.textContent)||r.getAttribute("title")||"").trim();const l=r.getAttribute("data-original")||((m=r.querySelector("img"))==null?void 0:m.src)||"";if(c){e.add(n);t.push({element:n,name:c,cover:l,path:r.pathname})}});return t},getDetailInfo(){const t=document.querySelector(".myui-content__thumb img");const e=document.querySelector(".myui-content__detail .title");const n=document.querySelector(".myui-content__thumb a");const r=((e==null?void 0:e.textContent)||"").trim();if(!r)return null;const a=(t==null?void 0:t.src)||"";const c=(n==null?void 0:n.getAttribute("href"))||location.pathname;return{name:r,cover:a,path:c}},getPlayInfo(){const t=document.querySelector("#player-sidebar .myui-panel__head h3.title");let e="";if(t){const n=t.cloneNode(true);n.querySelectorAll("small").forEach(r=>r.remove());e=n.textContent.trim()}if(!e)return null;return{name:e,path:location.pathname}}}; var ue={id:"czzy",name:"\u5382\u957F\u8D44\u6E90",domains:["www.4kcz.com","czzy.top","www.cz4k.com"],matches:["*://*.4kcz.com/*","*://*.czzy.top/*","*://*.cz4k.com/*"],include:["/^https?:\\/\\/([^/]*\\.)?(4kcz|czzy|cz4k)\\./"],searchPath:o(t=>"/#vc-search="+encodeURIComponent(t),"searchPath"),onPageReady(){const t=location.hash.match(/vc-search=([^&]+)/);if(!t)return;const e=decodeURIComponent(t[1]);let n=0;const r=o(()=>{if(n++>10)return;const a=document.querySelector("#sosuobox form, form.w-search-form");const c=a==null?void 0:a.querySelector("input[name]");const l=a==null?void 0:a.getAttribute("action");if(a&&c&&l){const m=new URL(l,location.href);m.searchParams.set(c.getAttribute("name"),e);location.href=m.href;return}setTimeout(r,300)},"trySearch");r()},pageType(){const t=location.pathname;if(t.startsWith("/movie/"))return"detail";if(t.startsWith("/v_play/"))return"play";if(/^\/(boss1O1|nimasile)\b/.test(t))return"search";if(document.querySelector(".bt_img, .bt_image"))return"list";return"other"},listCardSelector:".bt_img li, .bt_image li",getListCards(){const t=[];const e=new Set;document.querySelectorAll(".bt_img li, .bt_image li").forEach(n=>{if(e.has(n))return;const r=n.querySelector("a");const a=n.querySelector("img");const c=n.querySelector(".dytit");if(!r)return;const l=((c==null?void 0:c.textContent)||(a==null?void 0:a.alt)||"").trim();const m=(a==null?void 0:a.getAttribute("data-original"))||(a==null?void 0:a.src)||"";if(l){e.add(n);t.push({element:n,name:l,cover:m,path:r.pathname})}});return t},getDetailInfo(){const t=document.querySelector(".dyimg img");const e=document.querySelector(".dytext h1");const n=document.querySelector(".paly_list_btn a");const r=((e==null?void 0:e.textContent)||"").trim();if(!r)return null;const a=(t==null?void 0:t.src)||"";const c=(n==null?void 0:n.getAttribute("href"))||location.pathname;return{name:r,cover:a,path:c}},getPlayInfo(){const t=document.querySelector(".ptit a");if(!t)return null;const e=(t.textContent||"").trim();if(!e)return null;return{name:e,path:t.pathname}}}; function zt(t,e){return t.replace(/\{\{(\w+)\}\}/g,(n,r)=>e[r]??"")} o(zt,"interpolate"); function me(t){if(!t)return"";const e=new Date(t);const n=o(r=>String(r).padStart(2,"0"),"pad");return`${e.getFullYear()}-${n(e.getMonth()+1)}-${n(e.getDate())} ${n(e.getHours())}:${n(e.getMinutes())}`} o(me,"formatDate"); function Ft(t){if(!t||t<=0)return"";const e=Math.floor(t);const n=o(r=>String(r).padStart(2,"0"),"pad");return`${n(Math.floor(e/3600))}:${n(Math.floor(e%3600/60))}:${n(e%60)}`} o(Ft,"formatDuration"); function nt(t){return(t||"").replace(/\s*[((][^))]*[))]\s*/g,"").trim()} o(nt,"stripParens"); function bt(t){const e=(t||"").trim().match(/^第?\s*(\d+)\s*集?$/);return e?`\u7B2C${e[1]}\u96C6`:""} o(bt,"numberToEpisode"); function Dt(t){const e=(t||"").trim();return bt(e)||e} o(Dt,"episodeLabel"); function ve(t){const e=(t||"").match(/background-image:\s*url\(["']?([^"')]+)["']?\)/i);return e?e[1]:""} o(ve,"parseBgImage"); function R(t){return!t||/load\.gif|loading\.gif|placeholder|^data:image|\.svg$/i.test(t)} o(R,"isPlaceholderImage"); var er={"\u2160":"1","\u2161":"2","\u2162":"3","\u2163":"4","\u2164":"5","\u2165":"6","\u2166":"7","\u2167":"8","\u2168":"9","\u2169":"10","\u216A":"11","\u216B":"12","\u2170":"1","\u2171":"2","\u2172":"3","\u2173":"4","\u2174":"5","\u2175":"6","\u2176":"7","\u2177":"8","\u2178":"9","\u2179":"10","\u217A":"11","\u217B":"12"}; var nr={"\u3007":"0","\u4E00":"1","\u4E8C":"2","\u4E09":"3","\u56DB":"4","\u4E94":"5","\u516D":"6","\u4E03":"7","\u516B":"8","\u4E5D":"9","\u5341":"10"}; var rr=/[\s~~\-–—_·・.。,,、::;;!!??'""''()()[\]【】{}<>《》/\\|+=*#@$%&^]/g; function it(t){if(!t)return"";let e=String(t);e=e.replace(/[!-~]/g,n=>String.fromCharCode(n.charCodeAt(0)-65248));e=e.replace(/[Ⅰ-Ⅻⅰ-ⅻ]/g,n=>er[n]||n);e=e.replace(/[〇一二三四五六七八九十]/g,n=>nr[n]||n);e=e.replace(rr,"").toLowerCase();e=e.replace(/第0*(\d{1,2})季/g,(n,r)=>"s"+Number(r));e=e.replace(/season0*(\d{1,2})/g,(n,r)=>"s"+Number(r));e=e.replace(/(^|[^a-z])s0*(\d{1,2})(?![a-z0-9])/g,(n,r,a)=>r+"s"+Number(a));return e} o(it,"normalizeName"); function pe(t){const e=t.match(/(^|[^a-z])s(\d{1,2})(?![a-z0-9])/);return e?Number(e[2]):null} o(pe,"seasonOf"); var or=6; function st(t,e){const n=it(t);const r=it(e);if(!n||!r)return false;if(n===r)return true;if(pe(n)!==pe(r))return false;const a=n.length<=r.length?n:r;const c=a===n?r:n;return a.length>=or&&c.startsWith(a)} o(st,"isSameName"); var fe={id:"hantv",name:"\u97E9\u5267tv",domains:["hantv.net","www.hantv.net","hantvz.com","www.hantvz.com"],matches:["*://*.hantv.net/*","*://*.hantvz.com/*"],include:["/^https?:\\/\\/([^/]*\\.)?hantvz?\\./"],searchPath:o(t=>"/vodsearch.html?wd="+encodeURIComponent(t),"searchPath"),pageType(){const t=location.pathname;if(t.startsWith("/nf-detail/"))return"detail";if(t.startsWith("/nf-play/"))return"play";if(t.startsWith("/vodsearch"))return"search";if(document.querySelector(".module-items"))return"list";return"other"},listCardSelector:"a.module-poster-item, .module-card-item",getListCards(){const t=[];const e=new Set;document.querySelectorAll("a.module-poster-item").forEach(n=>{var l;if(e.has(n))return;const r=(((l=n.querySelector(".module-poster-item-title"))==null?void 0:l.textContent)||"").trim();const a=n.querySelector("img");const c=(a==null?void 0:a.getAttribute("data-original"))||(a==null?void 0:a.src)||"";if(r){e.add(n);t.push({element:n,name:r,cover:c,path:n.pathname})}});document.querySelectorAll(".module-card-item").forEach(n=>{var m;if(e.has(n))return;const r=(((m=n.querySelector(".module-card-item-title"))==null?void 0:m.textContent)||"").trim();const a=n.querySelector("img");const c=n.querySelector("a.module-card-item-poster");const l=(a==null?void 0:a.getAttribute("data-original"))||(a==null?void 0:a.src)||"";if(r&&c){e.add(n);t.push({element:n,name:r,cover:l,path:c.pathname})}});return t},getDetailInfo(){const t=document.querySelector(".module-info-poster img");const e=document.querySelector(".module-info-heading h1");const n=((e==null?void 0:e.textContent)||"").trim();if(!n)return null;const r=(t==null?void 0:t.src)||(t==null?void 0:t.getAttribute("data-original"))||"";return{name:n,cover:r,path:location.pathname}},getPlayInfo(){const t=document.querySelector(".module-player-side .module-info-heading a");if(!t)return null;const e=(t.getAttribute("title")||t.textContent||"").trim();if(!e)return null;return{name:e,path:t.pathname}}}; var he={id:"ddys",name:"\u4F4E\u7AEF\u5F71\u89C6",domains:["ddys.app","ddys.ai"],matches:["*://*.ddys.app/*","*://*.ddys.ai/*"],include:["/^https?:\\/\\/([^/]*\\.)?ddys\\./"],searchPath:o(t=>"/?s="+encodeURIComponent(t)+"&post_type=post","searchPath"),trackPlaybackOnDetail:true,pageType(){if(new URLSearchParams(location.search).has("s"))return"search";if(document.querySelector(".post-title"))return"detail";if(document.querySelector(".post-box"))return"list";return"other"},listCardSelector:".post-box",getListCards(){const t=[];document.querySelectorAll(".post-box").forEach(e=>{const n=e.querySelector(".post-box-title a")||e.querySelector("a");if(!n)return;const r=e.querySelector(".post-box-title");const a=nt((r==null?void 0:r.textContent)||"");const c=e.querySelector(".post-box-image");const l=ve((c==null?void 0:c.getAttribute("style"))||"");if(a){t.push({element:e,name:a,cover:l,path:n.pathname});if(l&&!e.dataset.ddysCoverBound){e.dataset.ddysCoverBound="1";e.addEventListener("click",()=>{try{sessionStorage.setItem("ddys_cover_"+a,l)}catch(m){}})}}});return t},getDetailInfo(){const t=document.querySelector(".post-title");const e=nt((t==null?void 0:t.textContent)||"");if(!e)return null;let n="";try{n=sessionStorage.getItem("ddys_cover_"+e)||""}catch(r){}if(!n){const r=document.querySelectorAll(".doulist-item img");if(r.length)n=r[r.length-1].src||""}return{name:e,cover:n,path:location.pathname}}}; var ge={id:"libvio",name:"LIBVIO",domains:["libvio.host","www.libvio.mov","www.libvios.com","www.libhd.com","libviobd.com","www.libvio.in"],matches:["*://*.libvio.host/*","*://*.libvio.mov/*","*://*.libvios.com/*","*://*.libhd.com/*","*://*.libviobd.com/*","*://*.libvio.in/*"],include:["/^https?:\\/\\/([^/]*\\.)?(libvio|libvios|libviobd|libhd)\\./"],searchPath:o(t=>"/search/-------------.html?wd="+encodeURIComponent(t),"searchPath"),pageType(){const t=location.pathname;if(t.startsWith("/detail/"))return"detail";if(t.startsWith("/w/"))return"play";if(t.startsWith("/search/"))return"search";if(document.querySelector(".stui-vodlist"))return"list";return"other"},listCardSelector:".stui-vodlist__box",getListCards(){const t=[];document.querySelectorAll(".stui-vodlist__box").forEach(e=>{const n=e.querySelector("a.stui-vodlist__thumb");const r=e.querySelector(".stui-vodlist__detail .title");if(!n)return;const a=((r==null?void 0:r.textContent)||n.getAttribute("title")||"").trim();const c=n.getAttribute("data-original")||"";if(a)t.push({element:e,name:a,cover:c,path:n.pathname})});return t},getDetailInfo(){const t=document.querySelector(".vod-poster img");const e=document.querySelector(".vod-info .title");const n=document.querySelector(".vod-info a");const r=((e==null?void 0:e.textContent)||"").trim();if(!r)return null;let a=(t==null?void 0:t.getAttribute("data-original"))||"";if(R(a))a=(t==null?void 0:t.src)||"";if(R(a))a="";const c=(n==null?void 0:n.getAttribute("href"))||location.pathname;return{name:r,cover:a,path:c}},getPlayInfo(){const t=document.querySelector(".stui-player__detail .title");const e=((t==null?void 0:t.textContent)||"").trim();if(!e)return null;return{name:e,path:location.pathname}}}; var ye={id:"xiuluo",name:"\u4FEE\u7F57\u5F71\u89C6",domains:["v.xl.in.ua","v.xl01.eu.cc","v.xl02.eu.cc","v.xl01.cc.ua"],matches:["*://*.v.xl.in.ua/*","*://*.v.xl01.eu.cc/*","*://*.v.xl02.eu.cc/*","*://*.v.xl01.cc.ua/*"],include:["/^https?:\\/\\/([^/]*\\.)?xl\\d*\\./"],searchPath:o(t=>"/search/"+encodeURIComponent(t),"searchPath"),pageType(){const t=location.pathname;if(t.includes("/play/"))return"play";if(t.startsWith("/search/"))return"search";if(document.querySelector(".movie-header, .movie-title"))return"detail";if(document.querySelector(".movie-card"))return"list";return"other"},listCardSelector:".movie-card",getListCards(){const t=[];document.querySelectorAll(".movie-card").forEach(e=>{const n=e.querySelector("a.card-img");const r=e.querySelector("img");const a=e.querySelector(".card-info h4");if(!n)return;const c=((a==null?void 0:a.textContent)||"").trim();const l=(r==null?void 0:r.getAttribute("data-src"))||(r==null?void 0:r.src)||"";if(c)t.push({element:e,name:c,cover:l,path:n.pathname})});return t},getDetailInfo(){const t=document.querySelector(".movie-poster img");const e=document.querySelector(".movie-title");const n=nt((e==null?void 0:e.textContent)||"");if(!n)return null;const r=(t==null?void 0:t.src)||"";return{name:n,cover:r,path:location.pathname}},getPlayInfo(){const t=document.querySelector(".player-title a");if(!t)return null;const e=(t.textContent||t.getAttribute("title")||"").trim();if(!e)return null;return{name:e,path:t.pathname}}}; function ar(t){if(!t.length)return"";const e=t.filter(r=>r.id!=="noneCoverImg"&&!/placeholder/i.test(r.src||""));const n=e.length?e[e.length-1]:t[t.length-1];return n.src||n.getAttribute("data-src")||n.getAttribute("data-original")||""} o(ar,"pickCover"); var be={id:"duse",name:"\u6BD2\u86C7\u7535\u5F71",domains:["www.duse2.com","www.duse3.com","www.duse4.com"],matches:["*://*.duse2.com/*","*://*.duse3.com/*","*://*.duse4.com/*","*://*.dushe3.app/*"],include:["/^https?:\\/\\/([^/]*\\.)?dush?e\\d+\\./"],searchPath:o(t=>"/#vc-search="+encodeURIComponent(t),"searchPath"),isPlayUrl(t){return/\/play\//.test(t||"")},onPageReady(){const t=location.hash.match(/vc-search=([^&]+)/);if(!t)return;const e=decodeURIComponent(t[1]);let n=0;const r=o(()=>{if(n++>30)return;const a=document.querySelector('input[name="t"], input#t');if(a&&a.value){location.href="/search?t="+encodeURIComponent(a.value)+"&k="+encodeURIComponent(e);return}const c=document.querySelectorAll("script:not([src])");for(const d of c){const w=d.textContent.match(/["']?t["']?\s*[:=]\s*["']([A-Za-z0-9+/=]{16,})["']/);if(w){location.href="/search?t="+encodeURIComponent(w[1])+"&k="+encodeURIComponent(e);return}}let l=document.querySelector('input[type="search"], input[placeholder*="\u641C"], input[placeholder*="Search" i], input[name="wd"], input[name="search"], input[name="q"], input[name="k"]');if(!l){l=Array.from(document.querySelectorAll('input[type="text"]')).find(d=>/search|搜索|搜|片名/.test(d.placeholder||"")||/search|wd|keyword|q|k/.test(d.name||""))}if(!l){const d=document.querySelector('[class*="search" i] i, [class*="search" i] svg, .search-icon, .icon-search, [aria-label*="search" i]');if(d)d.click();setTimeout(r,300);return}const m=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;m.call(l,e);l.dispatchEvent(new Event("input",{bubbles:true}));l.dispatchEvent(new Event("change",{bubbles:true}));l.focus();setTimeout(()=>{l.dispatchEvent(new KeyboardEvent("keydown",{key:"Enter",code:"Enter",keyCode:13,which:13,bubbles:true}));l.dispatchEvent(new KeyboardEvent("keyup",{key:"Enter",code:"Enter",keyCode:13,which:13,bubbles:true}));const d=document.querySelector('button[type="submit"], .search-btn, [class*="search" i] button');if(d)d.click();const w=l.closest("form");if(w)w.dispatchEvent(new Event("submit",{bubbles:true,cancelable:true}))},200)},"trySearch");r()},pageType(){const t=location.pathname;if(t.startsWith("/detail/"))return"detail";if(t.startsWith("/play/"))return"play";if(t.startsWith("/search"))return"search";if(document.querySelector("a.v-item"))return"list";return"other"},listCardSelector:"a.v-item",getListCards(){const t=[];document.querySelectorAll("a.v-item").forEach(e=>{let n="";e.querySelectorAll(".v-item-footer .v-item-title").forEach(c=>{if(n)return;if(c.style.display!=="none")n=c.textContent.trim()});if(!n)return;const r=Array.from(e.querySelectorAll(".v-item-cover img"));const a=ar(r);t.push({element:e,name:n,cover:a,path:e.pathname})});return t},getDetailInfo(){const t=document.querySelector(".detail-pic img");const e=((t==null?void 0:t.getAttribute("alt"))||"").trim();if(!e)return null;const n=(t==null?void 0:t.src)||"";const r=n&&!/placeholder/i.test(n)?n:(t==null?void 0:t.getAttribute("data-src"))||(t==null?void 0:t.getAttribute("data-original"))||n||"";return{name:e,cover:r,path:location.pathname}},getPlayInfo(){const t=document.querySelector(".detail-title a");if(!t)return null;const e=(t.textContent||"").trim();if(!e)return null;return{name:e,path:t.pathname}}}; var xe={id:"hanju",name:"\u97E9\u5267\u7F51",domains:["www.hanju.com","hanju.com"],matches:["*://*.hanju.com/*"],include:["/^https?:\\/\\/([^/]*\\.)?hanju\\./"],crossSiteTarget:false,pageType(){if(location.pathname.startsWith("/series/"))return"detail";return"other"},getDetailInfo(){const t=document.querySelector(".series-title");const e=document.querySelector(".series-image");const n=((t==null?void 0:t.textContent)||"").trim();if(!n)return null;return{name:n,cover:(e==null?void 0:e.getAttribute("src"))||(e==null?void 0:e.src)||"",path:location.pathname}}}; function cr(t){if(!t)return"";return[t.getAttribute("data-src"),t.getAttribute("src")].find(e=>!R(e))||""} o(cr,"pickCover"); var we={id:"gaze",name:"\u6CE8\u89C6\u5F71\u89C6",domains:["gaze.red","gazes.store","gazes.top","gaze.show","gazes.host"],matches:["*://*.gaze.red/*","*://*.gazes.store/*","*://*.gazes.top/*","*://*.gaze.show/*","*://*.gazes.host/*"],include:["/^https?:\\/\\/([^/]*\\.)?gazes?\\d*\\./"],searchPath:o(t=>"/filter?search="+encodeURIComponent(t),"searchPath"),pageType(){if(location.pathname.startsWith("/play/"))return"play";if(document.querySelector("article.eP"))return"list";return"other"},listCardSelector:"article.eP",getListCards(){const t=[];document.querySelectorAll("article.eP").forEach(e=>{const n=e.querySelector('a[href*="play/"]');if(!n)return;const r=e.querySelector("h3.ac .D")||e.querySelector("h3.ac");const a=e.querySelector("img.aj");const c=((r==null?void 0:r.textContent)||(a==null?void 0:a.getAttribute("alt"))||"").trim();if(c)t.push({element:e,name:c,cover:cr(a),path:n.pathname})});return t},getPlayInfo(){var n;const t=(((n=document.querySelector("h5.le"))==null?void 0:n.textContent)||"").trim();if(!t)return null;const e=document.querySelector("img.jO");return{name:t,cover:(e==null?void 0:e.src)||"",path:location.pathname}}}; var jt=12; var Se="video_collector_drama_data"; var Ot="video_collector_drama_position"; var Nt="video_collector_drama_collapsed"; var Bt="video_collector_drama_xjump_pos"; var xt="video_collector_drama_img_cache"; var ke="video_collector_drama_last_domain"; var lt="video_collector_drama_playback"; var _e=10; var Ee=.05; var Rt="https://raw.giteeusercontent.com/xiaobin90/jVideoCollector/raw/main/sites-domains.json"; var wt="video_collector_drama_domain_list"; function V(t){return(t||"").replace(/^www\./,"")} o(V,"normalizeHost"); var ir=800; var sr=6*60*60*1e3; function Le({lastDomainKey:t,aliveCacheKey:e,probeDeadline:n=ir,ttl:r=sr}){let a=null;function c(){if(a===null){try{a=JSON.parse(GM_getValue(t,"{}"))}catch(i){a={}}}return a}o(c,"loadMap");function l(i,u){if(!i||!u)return;const x=c();if(x[i]===u)return;x[i]=u;GM_setValue(t,JSON.stringify(x))}o(l,"recordWorkingDomain");function m(i){return c()[i]||""}o(m,"getLastWorking");function d(i){if(!i||!i.domains||!i.domains.length)return"";const u=m(i.id);if(u&&i.domains.some(x=>V(x)===V(u)))return u;return i.domains[0]}o(d,"pickDomain");let w=null;const I=new Map;function s(){if(w)return w;try{w=GM_getValue(e,{})||{}}catch(i){w={}}return w}o(s,"loadAliveCache");function p(){try{GM_setValue(e,w)}catch(i){}}o(p,"saveAliveCache");try{if(typeof GM_addValueChangeListener==="function"){GM_addValueChangeListener(e,(i,u,x)=>{w=x||{}})}}catch(i){}function S(i){const u=s()[i];if(!u||Date.now()-u.ts>=r)return void 0;return!!u.alive}o(S,"cachedAlive");function b(i){const u=S(i);if(u!==void 0)return Promise.resolve(u);if(I.has(i))return I.get(i);const x=new Promise(h=>{const g=s();let C=false;const y=o(A=>{if(C)return;C=true;g[i]={alive:A,ts:Date.now()};p();h(A)},"finish");try{GM_xmlhttpRequest({method:"HEAD",url:"https://"+i+"/",timeout:3e3,onload:o(()=>y(true),"onload"),onerror:o(()=>y(false),"onerror"),ontimeout:o(()=>y(false),"ontimeout")})}catch(A){y(false)}}).then(h=>{I.delete(i);return h});I.set(i,x);return x}o(b,"probeDomain");function _(i){const u=m(i.id);if(u&&i.domains.some(x=>V(x)===V(u))){return[u,...i.domains.filter(x=>V(x)!==V(u))]}return i.domains}o(_,"candidateDomains");function E(i){if(!i||!i.domains||!i.domains.length)return Promise.resolve("");const u=_(i);const x=u.find(g=>S(g)===true);if(x)return Promise.resolve(x);const h=u.filter(g=>S(g)===void 0);if(!h.length)return Promise.resolve(u[0]);return new Promise(g=>{let C=null;let y=false;let A=h.length;const k=o((q,P)=>{if(y)return;y=true;clearTimeout(C);g(q);if(!P)return;try{if(m(i.id)!==q)l(i.id,q)}catch(ct){}},"settle");C=setTimeout(()=>k(d(i)||u[0],false),n);h.forEach(q=>{b(q).then(P=>{if(P){k(q,true)}else if(--A===0){k(u[0],false)}})})})}o(E,"findAliveDomain");return{recordWorkingDomain:l,getLastWorking:m,pickDomain:d,findAliveDomain:E}} o(Le,"createDomainResolver"); var lr=Le({lastDomainKey:ke,aliveCacheKey:"video_collector_drama_domain_alive"}); var{recordWorkingDomain:Te,getLastWorking:$o,pickDomain:Vt,findAliveDomain:$t} =lr; var dr=24*60*60*1e3; function ur(){try{const t=JSON.parse(GM_getValue(wt,"{}"));return t&&t.sites||{}}catch(t){return{}}} o(ur,"loadRemoteDomains"); function Ut(t){const e=ur()[t.id];if(!Array.isArray(e)||!e.length)return;const n=new Set(t.domains.map(r=>V(r)));t.domains.push(...e.filter(r=>!n.has(V(r))))} o(Ut,"mergeRemoteDomains"); function Ce(){if(!Rt)return Promise.resolve();try{const t=JSON.parse(GM_getValue(wt,"{}"));if(t&&t.ts&&Date.now()-t.ts{try{GM_xmlhttpRequest({method:"GET",url:Rt,timeout:1e4,onload:o(e=>{try{const n=JSON.parse(e.responseText);if(n&&typeof n.sites==="object"){GM_setValue(wt,JSON.stringify({ts:Date.now(),sites:n.sites}))}}catch(n){}t()},"onload"),onerror:o(()=>t(),"onerror"),ontimeout:o(()=>t(),"ontimeout")})}catch(e){t()}})} o(Ce,"refreshDomainList"); var Y=[de,ue,fe,he,ge,ye,be,xe,we]; var rt=void 0; function pr(t){const e=location.href;return(t.include||[]).some(n=>{const r=/^\/(.*)\/$/.exec(n);if(!r)return false;try{return new RegExp(r[1]).test(e)}catch(a){return false}})} o(pr,"matchInclude"); function N(){if(rt!==void 0)return rt;const t=location.hostname;rt=Y.find(e=>e.domains.some(n=>V(n)===V(t))||pr(e))||null;if(rt)Te(rt.id,t);return rt} o(N,"getCurrentSite"); var U={currentTab:"want",currentPage:{want:1,watched:1,history:1},renderedTabs:new Set,searchKeyword:"",siteFilter:""}; var mr={jav:"JAV \u89C6\u9891",drama:"\u5F71\u89C6"}; function Pe({storageKey:t,backupFileName:e,moduleId:n,itemIdField:r,showAlert:a,chooseImportStrategy:c,historyLoadFn:l,historySaveFn:m}){function d(){try{const i=GM_getValue(t,"");return i?JSON.parse(i):{want:[],watched:[]}}catch(i){return{want:[],watched:[]}}}o(d,"loadData");function w(i){GM_setValue(t,JSON.stringify(i))}o(w,"saveData");function I(){const i=d();const u={module:n,want:i.want,watched:i.watched};if(l)u.history=l();const x=new Blob([JSON.stringify(u,null,2)],{type:"application/json"});const h=URL.createObjectURL(x);const g=document.createElement("a");g.href=h;g.download=`${e}_${new Date().toLocaleDateString().replace(/\//g,"-")}.json`;g.click();URL.revokeObjectURL(h)}o(I,"exportData");function s(i){return!!i&&typeof i==="object"&&i[r]!==void 0&&i[r]!==null&&i[r]!==""}o(s,"isValidItem");function p(i){if(!i||!Array.isArray(i.want)||!Array.isArray(i.watched)){return"\u6587\u4EF6\u683C\u5F0F\u4E0D\u6B63\u786E"}if(i.module&&i.module!==n){return`\u8BE5\u5907\u4EFD\u5C5E\u4E8E\u300C${mr[i.module]||i.module}\u300D\u6A21\u5757\uFF0C\u4E0D\u80FD\u5BFC\u5165\u5230\u5F53\u524D\u6A21\u5757`}const u=i.want[0]||i.watched[0];if(u&&!(r in u)){return"\u5907\u4EFD\u6570\u636E\u4E0E\u5F53\u524D\u6A21\u5757\u4E0D\u5339\u914D\uFF0C\u8BF7\u68C0\u67E5\u6587\u4EF6"}return""}o(p,"validateImported");function S(i,u,x){const h=[...i];const g=new Map(h.map((C,y)=>[C[r],y]));for(const C of u){if(!s(C))continue;const y=C[r];if(g.has(y)){if(x==="import")h[g.get(y)]=C}else{h.push(C);g.set(y,h.length-1)}}return h}o(S,"mergeList");function b(i,u,x){const h={added:0,duplicates:0,errors:0};if(x==="replace"){const C=o(y=>y.filter(A=>s(A)?(h.added++,true):(h.errors++,false)),"clean");return{data:{want:C(u.want),watched:C(u.watched)},stats:h}}const g=o((C,y)=>{const A=[];for(const P of y){if(s(P))A.push(P);else h.errors++}const k=S(C,A,x);const q=k.length-C.length;h.added+=q;h.duplicates+=A.length-q;return k},"mergeOne");return{data:{want:g(i.want,u.want),watched:g(i.watched,u.watched)},stats:h}}o(b,"buildMergedData");function _(i,u){if(u==="replace"){return`\u5BFC\u5165\u5B8C\u6210\uFF1A\u5BFC\u5165 ${i.added} \u6761\uFF0C\u8DF3\u8FC7\u9519\u8BEF ${i.errors} \u6761`}return`\u5BFC\u5165\u5B8C\u6210\uFF1A\u65B0\u589E ${i.added} \u6761\uFF0C\u91CD\u590D ${i.duplicates} \u6761\uFF0C\u9519\u8BEF ${i.errors} \u6761`}o(_,"formatResult");function E(i){const u=document.createElement("input");u.type="file";u.accept="application/json";u.onchange=x=>{const h=x.target.files[0];if(!h)return;const g=new FileReader;g.onload=async C=>{try{const y=JSON.parse(C.target.result);const A=p(y);if(A){a(A);return}const k=await c();if(!k)return;const q=d();const{data:P,stats:ct}=b(q,y,k);w(P);if(l&&m){const ht=Array.isArray(y.history)?y.history:[];const Ct=k==="replace"?ht.filter(s):S(l(),ht,k);m(Ct)}if(i)i();a(_(ct,k))}catch(y){a("\u6587\u4EF6\u89E3\u6790\u5931\u8D25")}};g.readAsText(h)};u.click()}o(E,"importData");return{loadData:d,saveData:w,exportData:I,importData:E}} o(Pe,"createStorageHelper"); var Ie=`
`; var Ae=`
选择导入方式
`; function qe(){const t=document.createElement("div");t.className="vc-confirm-mask";t.innerHTML=Ie;document.body.appendChild(t);requestAnimationFrame(()=>t.classList.add("show"));function e(){t.classList.remove("show");setTimeout(()=>t.remove(),150)}o(e,"close");return{mask:t,close:e}} o(qe,"createModal"); function St(t,{danger:e=false}={}){return new Promise(n=>{const{mask:r,close:a}=qe();r.querySelector(".vc-confirm-text").textContent=t;if(e)r.querySelector(".vc-confirm-ok").classList.add("danger");function c(l){a();n(l)}o(c,"finish");r.querySelector(".vc-confirm-cancel").onclick=()=>c(false);r.querySelector(".vc-confirm-ok").onclick=()=>c(true);r.onclick=l=>{if(l.target===r)c(false)}})} o(St,"showConfirm"); function Me(t){return new Promise(e=>{const{mask:n,close:r}=qe();n.querySelector(".vc-confirm-text").textContent=t;n.querySelector(".vc-confirm-cancel").style.display="none";n.querySelector(".vc-confirm-ok").onclick=()=>{r();e()};n.onclick=a=>{if(a.target===n){r();e()}}})} o(Me,"showAlert"); function ze(){return new Promise(t=>{const e=document.createElement("div");e.className="vc-confirm-mask";e.innerHTML=Ae;document.body.appendChild(e);requestAnimationFrame(()=>e.classList.add("show"));function n(r){e.classList.remove("show");setTimeout(()=>e.remove(),150);t(r)}o(n,"close");e.querySelectorAll(".vc-import-option").forEach(r=>{r.onclick=()=>n(r.dataset.strategy)});e.querySelector(".vc-confirm-cancel").onclick=()=>n(null);e.onclick=r=>{if(r.target===e)n(null)}})} o(ze,"showImportStrategyDialog"); var{loadData:$,saveData:X,exportData:Fe,importData:De} =Pe({storageKey:Se,backupFileName:"\u89C6\u9891\u6536\u85CF\u5907\u4EFD",moduleId:"drama",itemIdField:"name",showAlert:Me,chooseImportStrategy:ze,historyLoadFn:gr,historySaveFn:yr}); function B(t,e){return e.findIndex(n=>st(n.name,t))} o(B,"findItem"); function Kt(){try{return JSON.parse(GM_getValue(xt,"{}"))}catch(t){return{}}} o(Kt,"loadImageCache"); function Wt(t,e){if(!t||R(e))return;const n=Kt();n[t]=e;GM_setValue(xt,JSON.stringify(n))} o(Wt,"setImageCache"); function dt(t){const e=Kt();const n=e[t]?t:Object.keys(e).find(a=>st(a,t));const r=n?e[n]:"";if(!r)return"";return typeof r==="string"?r:r.cover||""} o(dt,"readImageCache"); function ut(t){const e=$();for(const a of["want","watched"]){const c=B(t,e[a]);if(c>-1){const l=e[a][c].cover||"";if(l&&!R(l))return l}}const n=mt(t);const r=(n==null?void 0:n.cover)||"";return r&&!R(r)?r:""} o(ut,"getCoverFromExisting"); var Gt="vc_drama_play_tabs_alive"; function Ht(){try{return JSON.parse(GM_getValue(Gt,"{}"))}catch(t){return{}}} o(Ht,"loadPlayTabsAlive"); function Yt(t){if(!t)return;const e=Ht();e[t]=Date.now();GM_setValue(Gt,JSON.stringify(e))} o(Yt,"markPlayTabAlive"); function je(t){if(!t)return;const e=Ht();e[t]=0;GM_setValue(Gt,JSON.stringify(e))} o(je,"expirePlayTabAlive"); function Oe(t=""){const e=Ht();const n=Kt();let r=false;Object.keys(n).forEach(a=>{if(st(a,t))return;if(e[a]===0){delete n[a];r=true}});if(r)GM_setValue(xt,JSON.stringify(n))} o(Oe,"handlePageCache"); function pt(){try{return JSON.parse(GM_getValue(lt,"{}"))}catch(t){return{}}} o(pt,"loadPlaybackRecords"); function Xt(t,e){if(!e||!t)return"";if(t[e])return e;return Object.keys(t).find(n=>st(n,e))||""} o(Xt,"findRecordKey"); function mt(t){const e=pt();const n=Xt(e,t);return n?e[n]:null} o(mt,"getPlaybackRecord"); function Ne(t,{episode:e="",time:n=0,cover:r="",path:a="",siteId:c=""}={}){if(!t)return;const l=pt();const m=Xt(l,t)||t;l[m]={name:t,episode:e,time:n,cover:r,path:a,siteId:c,updateTime:Date.now()};GM_setValue(lt,JSON.stringify(l))} o(Ne,"savePlaybackRecord"); function Jt(t){const e=pt();const n=Xt(e,t);if(!n)return;delete e[n];GM_setValue(lt,JSON.stringify(e))} o(Jt,"deletePlaybackRecord"); function hr(t,e){if(B(t,e.want)>-1)return"want";if(B(t,e.watched)>-1)return"watched";return""} o(hr,"categoryOf"); function Be(){const t=pt();const e=$();const n=new Map;e.want.concat(e.watched).forEach(a=>n.set(it(a.name),a.cover));const r=new Map;Object.entries(t).forEach(([a,c])=>{const l=c.name||a;const m=it(l);const d=r.get(m);if(d&&(d.updateTime||0)>=(c.updateTime||0))return;r.set(m,{name:l,...c,cover:c.cover||n.get(m)||"",category:hr(l,e)})});return Array.from(r.values()).sort((a,c)=>(c.updateTime||0)-(a.updateTime||0))} o(Be,"loadPlaybackList"); function gr(){return Object.entries(pt()).map(([t,e])=>({name:t,...e}))} o(gr,"loadPlaybackExportList"); function yr(t=[]){const e={};t.forEach(n=>{if(n&&n.name){e[n.name]={episode:n.episode||"",time:n.time||0,cover:n.cover||"",path:n.path||"",siteId:n.siteId||"",updateTime:n.updateTime||Date.now()}}});GM_setValue(lt,JSON.stringify(e))} o(yr,"savePlaybackList"); function Qt(t){const e=[];const n=[document];const r=new Set([document]);while(n.length){const a=n.shift();a.querySelectorAll(t).forEach(c=>e.push(c));a.querySelectorAll("iframe").forEach(c=>{try{const l=c.contentDocument;if(l&&!r.has(l)){r.add(l);n.push(l)}}catch(l){}})}return e} o(Qt,"queryAllInFrames"); function kt(){const t=Qt("video")[0]||null;if(!t)return{video:null,frame:null};let e=null;try{e=t.ownerDocument.defaultView.frameElement||null}catch(n){e=null}return{video:t,frame:e}} o(kt,"findPlayerVideo"); function Ve(t){if(!t||typeof t.focus!=="function")return false;if(t.tabIndex<0&&!t.hasAttribute("tabindex"))t.tabIndex=-1;try{t.focus({preventScroll:true})}catch(e){return false}return t.ownerDocument.activeElement===t} o(Ve,"focusEl"); function br(t){const e=t.getBoundingClientRect();return e.width>=200&&e.height>=120} o(br,"isVisibleFrame"); function xr(t){try{return!t.contentDocument}catch(e){return true}} o(xr,"isCrossOriginFrame"); function Zt(t){let e=null;let n=0;t.forEach(r=>{const a=r.getBoundingClientRect();const c=a.width*a.height;if(c>n){n=c;e=r}});return e} o(Zt,"largestOf"); function wr(t){const e=Array.from(document.querySelectorAll("iframe")).filter(br);if(!e.length)return null;if(t){const a=e.filter(c=>{try{return c.matches(t)}catch(l){return false}});if(a.length)return Zt(a)}const n=e.filter(a=>/player|play\.php|\/vod\//i.test(a.getAttribute("src")||""));if(n.length)return Zt(n);const r=e.filter(xr);return Zt(r.length?r:e)} o(wr,"pickPlayerFrame"); function Re(t){if(!t)return false;const e=Ve(t);try{t.contentWindow.focus()}catch(n){}return e||document.activeElement===t} o(Re,"focusFrame"); function vt(t,{force:e=false}={}){const n=document.activeElement;if(n&&n!==document.body&&n!==document.documentElement){if(!e||n.tagName!=="IFRAME")return false}const{video:r,frame:a}=kt();if(a)return Re(a);if(r)return Ve(r);return Re(wr(t))} o(vt,"focusPlayer"); var Sr=''; function ot(t,{duration:e=6e3,icon:n="",variant:r=""}={}){let a=document.querySelector(".vc-toast");if(!a){a=document.createElement("div");a.className="vc-toast";a.innerHTML=` ${Sr} `;a.querySelector(".vc-toast-close").addEventListener("click",()=>{a.classList.remove("show")});document.body.appendChild(a)}a.classList.remove("show");void a.offsetWidth;a.classList.toggle("variant-primary",r==="primary");a.querySelector(".vc-toast-icon").style.display=n==="play"?"":"none";a.querySelector(".vc-toast-text").textContent=t;a.style.setProperty("--vc-toast-duration",`${e}ms`);a.classList.add("show");clearTimeout(a._timer);a._timer=setTimeout(()=>a.classList.remove("show"),e)} o(ot,"showToast"); function Z(t){const e=document.querySelector(t);return e?e.textContent.trim():""} o(Z,"text"); function kr(t){const e=(t||"").match(/第\s*\d+\s*集/);return e?e[0].replace(/\s+/g,""):""} o(kr,"episodeFromText"); var _r="\u6B63\u7247"; var Er={czzy:o(()=>{const t=Array.from(document.querySelectorAll(".juji_list a"));if(t.length){const e=t.find(r=>r.classList.contains("pbplay"))||(t.length===1?t[0]:null);const n=((e==null?void 0:e.textContent)||"").trim();if(n)return Dt(n)}return bt(Z(".mikd .ptit span"))||_r},"czzy"),duse:o(()=>Z(".episode-list .episode-item-active span"),"duse"),dida:o(()=>bt(Z(".myui-content__list.playlist li.active a")),"dida"),ddys:o(()=>{const t=Z(".ddys-playlist-item.ddys-playlist-playing .ddys-playlist-item-title");if(!t)return"";const e=Z(".ddys-season-tab.is-active");return(e?`${e} `:"")+`\u7B2C${t.trim()}\u96C6`},"ddys"),hantv:o(()=>Z(".module-play-list-link.active span"),"hantv"),xiuluo:o(()=>{var e,n;const t=(n=(e=document.querySelector(".player-title"))==null?void 0:e.textContent)==null?void 0:n.match(/第\s*(\d+)\s*集/);return t?`\u7B2C${t[1]}\u96C6`:""},"xiuluo"),libvio:o(()=>Z(".stui-play__list li.active a"),"libvio"),gaze:o(()=>{var n;const t=document.querySelector(".fJ.bB.dE .playbtn.ji");const e=((t==null?void 0:t.textContent)||"").trim();return e?Dt(e):kr((n=document.querySelector("video-player"))==null?void 0:n.getAttribute("content-title"))},"gaze")}; var Lr={ddys:o(()=>new URLSearchParams(location.search).get("ep")||"","ddys"),dida:o(()=>_t(location.pathname),"dida"),hantv:o(()=>_t(location.pathname),"hantv"),libvio:o(()=>_t(location.pathname),"libvio"),xiuluo:o(()=>_t(location.pathname),"xiuluo")}; function _t(t){const e=t.match(/(\d+)(?:\.html?)?$/);return e?`\u7B2C${e[1]}\u96C6`:""} o(_t,"lastEpisodeFromPath"); function $e(t){if(typeof t.getPlaybackInfo==="function"){const r=t.getPlaybackInfo();if(r&&r.episode)return r.episode}const e=Er[t.id];if(e){const r=e();if(r)return r}const n=Lr[t.id];if(n){const r=n();if(r)return r}return""} o($e,"resolveEpisode"); function Tr(){return Qt("video")[0]||null} o(Tr,"findPlayerEl"); function Cr(){const t=Tr();return t?{time:t.currentTime,ended:!!t.ended}:null} o(Cr,"readPlayerTime"); var Pr=[".vod-poster__wrap img",".stui-player__detail img",".myui-content__thumb img",".module-info-poster img",".movie-poster img",".detail-pic img",".dyimg img"]; var Ue="vc_drama_watching_context"; function Ir(t){try{const e=sessionStorage.getItem(Ue)===t;sessionStorage.setItem(Ue,t);return e}catch(e){return false}} o(Ir,"isSameWatchingContext"); function Ar(){for(const t of Pr){const e=document.querySelector(t);if(!e)continue;const n=e.getAttribute("data-original")||e.src||"";if(!R(n))return n}return""} o(Ar,"coverFromPage"); function Ke(t,e){if(!e)return()=>{};Yt(e);const n=o(()=>je(e),"onPageHide");const r=o(()=>{if(!document.hidden)Yt(e)},"onVisibilityChange");document.addEventListener("pagehide",n);document.addEventListener("visibilitychange",r);let a=$e(t);const c=mt(e);const l=(c==null?void 0:c.cover)&&!R(c.cover)?c.cover:"";const m=l||ut(e)||dt(e)||Ar();if(!Ir(e)&&c){if(c.time>30){const s=Ft(c.time);const p=c.episode?`\uFF08${c.episode}\uFF09`:"";ot(`\u4E0A\u6B21\u64AD\u653E\u5230 ${s}${p}`,{duration:1e4,icon:"play",variant:"primary"})}else if(c.episode){ot(`\u4E0A\u6B21\u89C2\u770B\u5230\uFF08${c.episode}\uFF09`,{duration:1e4,icon:"play",variant:"primary"})}}const d=o((s,p)=>{Ne(e,{episode:p||a,time:s,cover:m,path:location.pathname,siteId:t.id})},"saveNow");let w=false;const I=setInterval(()=>{const s=$e(t)||a;if(s&&s!==a){a=s;w=false}if(!a)return;const p=Cr();if(p&&p.ended)return;if(p&&p.time>5){w=true;d(p.time,a)}else if(!p&&!w){if(document.hidden)return;w=true;d(0,a)}},3e4);return()=>{clearInterval(I);document.removeEventListener("pagehide",n);document.removeEventListener("visibilitychange",r)}} o(Ke,"initPlayback"); function We(t){if(!t)return"";const e=Ft(t.time);return[t.episode,e].filter(Boolean).join(" ")} o(We,"formatPlayback"); function Et(){const t=N();if(!t)return"";const e=t.pageType();if(e==="detail"&&t.getDetailInfo)return(t.getDetailInfo()||{}).name||"";if(e==="play"&&t.getPlayInfo)return(t.getPlayInfo()||{}).name||"";return""} o(Et,"getCurrentName"); function te(){const t=N();if(!t||t.pageType()!=="detail"||!t.getDetailInfo)return;const e=t.getDetailInfo();if(e&&e.name&&e.cover)Wt(e.name,e.cover)} o(te,"cacheCurrentDetailImage"); function Lt(t,e){const n=$();return B(t,n[e])>-1} o(Lt,"isFavorited"); function Ge(t,e){const n=$();const r=e==="want"?"watched":"want";const a=B(t.name,n[e]);const c=B(t.name,n[r]);if(c>-1)n[r].splice(c,1);if(a>-1){n[e].splice(a,1)}else{t.updateTime=Date.now();n[e].unshift(t)}X(n);U.renderedTabs.clear()} o(Ge,"toggleFavorite"); function He(t){const e=N();if(!e)return;const n=e.pageType();let r=null;if(n==="detail")r=e.getDetailInfo?e.getDetailInfo():null;else if(n==="play")r=e.getPlayInfo?e.getPlayInfo():null;if(!r||!r.name)return;const a=r.name;const c=$();const l=B(a,c[t]);if(l>-1){c[t].splice(l,1);X(c)}else{let m="";if(n==="detail"){m=r.cover||ut(a)||dt(a);Wt(a,m)}else if(n==="play"){m=ut(a)||dt(a)||r.cover}const d=t==="want"?"watched":"want";const w=B(a,c[d]);if(w>-1)c[d].splice(w,1);c[t].unshift({name:a,cover:m,path:r.path||location.pathname,siteId:e.id,createTime:Date.now(),updateTime:Date.now()});X(c)}U.renderedTabs.clear();K()} o(He,"toggleDrama"); function Ye(){He("want")} o(Ye,"toggleWant"); function Xe(){He("watched")} o(Xe,"toggleWatched"); function Je(t,e){if(e==="history"){Jt(t);U.renderedTabs.clear();Q();return}const n=$();const r=B(t,n[e]);if(r>-1){n[e].splice(r,1);X(n);U.renderedTabs.clear();Q();K()}} o(Je,"deleteItem"); function Ze(t,e,n){const r=$();const a=B(t,r[e]);if(a===-1)return;const c=r[e].splice(a,1)[0];c.updateTime=Date.now();r[n].unshift(c);X(r);U.renderedTabs.clear();Q();K()} o(Ze,"moveItem"); function Qe(){const t=N();if(!t)return false;const e=t.pageType();return e==="detail"||e==="play"} o(Qe,"isDetailOrPlay"); function tn(t,e,n){const r=$();const a=[];for(const c of t){const l=B(c,r[e]);if(l>-1){const m=r[e].splice(l,1)[0];m.updateTime=Date.now();a.push(m)}}r[n].unshift(...a);X(r);U.renderedTabs.clear();Q();K()} o(tn,"batchMoveItems"); function en(t,e){if(e==="history"){t.forEach(r=>Jt(r));U.renderedTabs.clear();Q();return}const n=$();for(const r of t){const a=B(r,n[e]);if(a>-1)n[e].splice(a,1)}X(n);U.renderedTabs.clear();Q();K()} o(en,"batchDeleteItems"); var qr=/^(input|textarea|select)$/i; var Mr=/^(button|a|summary)$/i; var zr=[" ","Spacebar"]; var Fr=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"," ","Spacebar"]; function nn({getVideo:t,step:e=5,volumeStep:n=.05,onAction:r,onNoVideo:a}){let c=false;function l(s){if(!s||!s.tagName)return false;return qr.test(s.tagName)||s.isContentEditable===true}o(l,"isEditable");function m(s){if(!s||!s.tagName)return false;return Mr.test(s.tagName)}o(m,"isActivatable");function d(s,p){const S=s.muted;s.muted=false;s.volume=Math.max(0,Math.min(1,Math.round(p*100)/100));const b=`\u97F3\u91CF ${Math.round(s.volume*100)}%`;return S?`\u5DF2\u53D6\u6D88\u9759\u97F3 \xB7 ${b}`:b}o(d,"setVolume");function w(s,p){switch(s){case"ArrowRight":return()=>{p.currentTime+=e;return`\u5FEB\u8FDB ${e} \u79D2`};case"ArrowLeft":return()=>{p.currentTime=Math.max(0,p.currentTime-e);return`\u5FEB\u9000 ${e} \u79D2`};case"ArrowUp":return()=>d(p,p.volume+n);case"ArrowDown":return()=>d(p,p.volume-n);case" ":case"Spacebar":return()=>{if(p.paused){Promise.resolve(p.play()).catch(()=>{});return"\u64AD\u653E"}p.pause();return"\u6682\u505C"};default:return null}}o(w,"actionFor");function I(s){if(s.defaultPrevented)return;if(s.ctrlKey||s.altKey||s.metaKey)return;if(l(s.target))return;if(zr.includes(s.key)&&m(s.target))return;if(!Fr.includes(s.key))return;const p=t();if(!p||!p.isConnected){s.preventDefault();if(a)a();return}if(p.controls&&p.ownerDocument.activeElement===p)return;const S=w(s.key,p);if(!S)return;const b=S();s.preventDefault();if(b&&r)r(b)}o(I,"onKeyDown");return{enable(){if(c)return;c=true;window.addEventListener("keydown",I)},disable(){if(!c)return;c=false;window.removeEventListener("keydown",I)}}} o(nn,"createPlayerKeyboard"); function rn(t){let e=document.querySelector(".vc-image-preview");if(!e){e=document.createElement("div");e.className="vc-image-preview";const n=document.createElement("img");n.alt="\u5C01\u9762\u9884\u89C8";e.appendChild(n);e.addEventListener("click",()=>e.classList.remove("show"));document.body.appendChild(e)}e.querySelector("img").src=t;e.classList.add("show")} o(rn,"openImagePreview"); function on(t){if(!t)return false;const e=o(()=>{const n=document.createElement("textarea");n.value=t;n.style.position="fixed";n.style.opacity="0";document.body.appendChild(n);n.select();let r=false;try{r=document.execCommand("copy")}catch(a){r=false}document.body.removeChild(n);return r},"fallback");if(navigator.clipboard&&window.isSecureContext){navigator.clipboard.writeText(t).catch(()=>e());return true}return e()} o(on,"copyText"); function an(t){const{state:e,pageSize:n,loadFn:r,filterFn:a,getId:c,getTitle:l,getUrl:m,resolveUrlFn:d,getSiteName:w,getTime:I,getAvcode:s,moveFn:p,deleteFn:S,batchMoveFn:b,batchDeleteFn:_,exportFn:E,importFn:i,updateButtonStateFn:u,getExtraInfo:x,getCategoryMark:h,hasHistory:g,emptyText:C,templates:y}=t;const A={want:"\u60F3\u770B",watched:"\u5DF2\u770B",history:"\u89C2\u770B\u8BB0\u5F55"};let k=null;let q=false;const P=new Set;function ct(){const v=document.createElement("div");v.className="vc-mask";v.onclick=T=>{if(T.target===v)At()};const L=document.createElement("div");L.className="vc-panel";L.innerHTML=y.panelTemplate;if(!g){const T=L.querySelector('.vc-tab[data-type="history"]');const f=L.querySelector('.vc-list-wrap[data-type="history"]');if(T)T.style.display="none";if(f)f.style.display="none"}v.appendChild(L);document.body.appendChild(v);k=v;ht(L)}o(ct,"createPanel");function ht(v){v.querySelector(".vc-close").onclick=At;v.querySelectorAll(".vc-tab").forEach(f=>{f.onclick=()=>{if(q)et();v.querySelectorAll(".vc-tab").forEach(M=>M.classList.remove("active"));f.classList.add("active");e.currentTab=f.dataset.type;Ct(f.dataset.type)}});const L=v.querySelector(".vc-search");L.oninput=f=>{e.searchKeyword=f.target.value.trim();e.currentPage[e.currentTab]=1;e.renderedTabs.clear();G()};v.querySelector("#vc-refresh").onclick=()=>{e.renderedTabs.clear();G()};v.querySelector("#vc-export").onclick=E;v.querySelector("#vc-import").onclick=()=>{i(()=>{e.renderedTabs.clear();G();if(u)u()})};v.querySelector("#vc-first").onclick=()=>gt(1);v.querySelector("#vc-prev").onclick=()=>gt(e.currentPage[e.currentTab]-1);v.querySelector("#vc-next").onclick=()=>gt(e.currentPage[e.currentTab]+1);v.querySelector("#vc-last").onclick=()=>gt(ce(e.currentTab));const T=v.querySelector("#vc-site-select");T.addEventListener("change",()=>{e.siteFilter=T.value;e.currentPage[e.currentTab]=1;e.renderedTabs.clear();G()});v.querySelector("#vc-batch-toggle").onclick=()=>{if(q)et();else Yn()};v.querySelector("#vc-batch-selectall").onchange=f=>{const M=v.querySelector(`#vc-grid-${e.currentTab}`);const D=M?M.querySelectorAll(".vc-card"):[];D.forEach(j=>{const F=j.dataset.id;const O=j.querySelector(".vc-card-check");if(f.target.checked){P.add(F);j.classList.add("selected");if(O)O.checked=true}else{P.delete(F);j.classList.remove("selected");if(O)O.checked=false}});It()};v.querySelector("#vc-batch-move").onclick=async()=>{if(e.currentTab==="history")return;if(P.size===0)return;const f=e.currentTab;const M=f==="want"?"watched":"want";const D=f==="want"?"\u5DF2\u770B":"\u60F3\u770B";const j=await St(`\u786E\u5B9A\u5C06\u9009\u4E2D\u7684 ${P.size} \u6761\u79FB\u5230${D}\u5417\uFF1F`);if(!j)return;b(Array.from(P),f,M);et()};v.querySelector("#vc-batch-delete").onclick=async()=>{if(P.size===0)return;const f=e.currentTab;const M=f==="history"?"\u89C2\u770B\u8BB0\u5F55":"\u6536\u85CF";const D=await St(`\u786E\u5B9A\u5220\u9664\u9009\u4E2D\u7684 ${P.size} \u6761${M}\u5417\uFF1F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\u3002`,{danger:true});if(!D)return;_(Array.from(P),f);et()};v.querySelector("#vc-batch-cancel").onclick=()=>et()}o(ht,"bindPanelEvents");function Ct(v){k.querySelectorAll(".vc-list-wrap").forEach(L=>{L.classList.toggle("active",L.dataset.type===v)});if(!e.renderedTabs.has(v)){ie(v);e.renderedTabs.add(v)}le()}o(Ct,"switchTab");function G(){ie(e.currentTab);e.renderedTabs.add(e.currentTab);le();if(q)It()}o(G,"renderActiveList");function Wn(v){const L=new Map;v.forEach(T=>{const f=T.siteId||"";if(!f||L.has(f))return;L.set(f,w(T)||f)});return Array.from(L,([T,f])=>({id:T,name:f}))}o(Wn,"collectSiteFilters");function Gn(v){const L=k.querySelector("#vc-site-select");if(!L)return;const T=[{id:"",name:"\u5168\u90E8"},...v];L.innerHTML=T.map(f=>``).join("");if(!v.some(f=>f.id===e.siteFilter))e.siteFilter="";L.value=e.siteFilter}o(Gn,"renderSiteSelect");function Pt(v){let L=a(v,e.searchKeyword);if(e.siteFilter)L=L.filter(T=>(T.siteId||"")===e.siteFilter);return L}o(Pt,"applyFilters");function ce(v){const L=r();const T=Pt(L[v]||[]);return Math.ceil(T.length/n)||1}o(ce,"getTotalPages");function gt(v){const L=ce(e.currentTab);const T=Math.max(1,Math.min(v,L));if(T===e.currentPage[e.currentTab])return;e.currentPage[e.currentTab]=T;e.renderedTabs.clear();G()}o(gt,"jumpToPage");function ie(v){const L=r();const T=L[v]||[];Gn(Wn(T));const f=Pt(T);const M=e.currentPage[v];const D=(M-1)*n;const j=f.slice(D,D+n);const F=k.querySelector(`#vc-grid-${v}`);const O=v==="want"?"watched":"want";const qt=v==="want"?"\u6807\u8BB0\u5DF2\u770B":"\u79FB\u56DE\u60F3\u770B";if(f.length===0){F.innerHTML="";const z=document.createElement("div");z.className="vc-empty";z.textContent=C;F.appendChild(z);return}F.innerHTML=j.map(z=>{const H=z.cover?zt(y.coverImageTemplate,{cover:z.cover,title:l(z)}):y.defaultCoverTemplate;const Mt=s?s(z):z.avcode||"";const Zn=Mt?``:"";const yt=h?h(z):null;const Qn=yt?`${yt.icon}`:"";return zt(y.cardTemplate,{id:c(z),title:l(z),url:m(z),siteName:w(z),dateStr:me(I(z)),lastPlayed:x?x(z):"",oppositeType:O,oppositeText:qt,coverHtml:H,copyBtnHtml:Zn,categoryHtml:Qn})}).join("");Hn(F,L,v)}o(ie,"renderList");function Hn(v,L,T){v.querySelectorAll(".vc-card").forEach(f=>{const M=f.dataset.id;const D=f.dataset.url;const j=L[T].find(F=>c(F)===M);if(q){const F=f.querySelector(".vc-card-check");f.addEventListener("click",O=>{if(O.target.closest(".vc-card-checkbox"))return;se(f,M)});if(F){F.addEventListener("change",()=>{se(f,M,F.checked)})}if(P.has(M)){f.classList.add("selected");if(F)F.checked=true}}else{if(d){f.addEventListener("mouseenter",()=>{Promise.resolve(d(j,D)).catch(()=>{})},{once:true})}f.addEventListener("click",async z=>{if(z.target.closest(".vc-card-actions"))return;if(z.target.tagName==="IMG"&&(j==null?void 0:j.cover)){rn(j.cover);return}let H=D;if(d){try{H=await d(j,D)||D}catch(Mt){H=D}}if(H)window.open(H,"_blank")});const F=f.querySelector(".vc-card-move-btn");if(T==="history"){F.style.display="none"}else{F.addEventListener("click",z=>{z.stopPropagation();p(M,T,z.target.dataset.to)})}const O=f.querySelector(".vc-card-copy");if(O){O.addEventListener("click",z=>{z.stopPropagation();if(on(O.dataset.avcode||"")){O.textContent="\u2705";clearTimeout(O._copyTimer);O._copyTimer=setTimeout(()=>{O.textContent="\u{1F4CB}"},3e3)}})}const qt=T==="history"?"\u786E\u5B9A\u5220\u9664\u8FD9\u6761\u89C2\u770B\u8BB0\u5F55\u5417\uFF1F":"\u786E\u5B9A\u5220\u9664\u8FD9\u6761\u6536\u85CF\u5417\uFF1F";f.querySelector(".vc-card-delete-btn").addEventListener("click",z=>{z.stopPropagation();St(qt,{danger:true}).then(H=>{if(H)S(M,T)})})}});v.querySelectorAll(".vc-card-cover img").forEach(f=>{f.addEventListener("error",function(){this.onerror=null;this.parentElement.innerHTML=y.defaultCoverTemplate})})}o(Hn,"bindCardEvents");function se(v,L,T){const f=v.querySelector(".vc-card-check");const M=T!==void 0?T:!P.has(L);if(M){P.add(L);v.classList.add("selected");if(f)f.checked=true}else{P.delete(L);v.classList.remove("selected");if(f)f.checked=false}It()}o(se,"toggleCardSelected");function Yn(){q=true;P.clear();k.querySelector(".vc-panel").classList.add("batch-mode");k.querySelector("#vc-batch-bar").style.display="";e.renderedTabs.clear();G()}o(Yn,"enterBatchMode");function et(){q=false;P.clear();k.querySelector(".vc-panel").classList.remove("batch-mode");k.querySelector("#vc-batch-bar").style.display="none";k.querySelector("#vc-batch-selectall").checked=false;e.renderedTabs.clear();G()}o(et,"exitBatchMode");function It(){const v=e.currentTab;const L=k.querySelector(`#vc-grid-${v}`);const T=L?L.querySelectorAll(".vc-card"):[];const f=T.length;let M=0;T.forEach(O=>{if(P.has(O.dataset.id))M++});k.querySelector("#vc-batch-count").textContent=`\u5DF2\u9009 ${P.size} \u6761`;const D=k.querySelector("#vc-batch-selectall");D.checked=f>0&&M===f;const j=P.size>0;k.querySelector("#vc-batch-delete").disabled=!j;const F=k.querySelector("#vc-batch-move");if(v==="history"){F.style.display="none"}else{F.style.display="";F.disabled=!j;F.textContent=v==="want"?"\u79FB\u5230\u5DF2\u770B":"\u79FB\u5230\u60F3\u770B"}}o(It,"updateBatchUI");function le(){const v=r();const L=Pt(v[e.currentTab]||[]);const T=L.length;const f=Math.max(1,Math.ceil(T/n));const M=e.currentPage[e.currentTab];const D=A[e.currentTab]||"";k.querySelector("#vc-count-info").textContent=`\u5171 ${T} \u6761${D}`;k.querySelector("#vc-page-info").textContent=`${M} / ${f}`;k.querySelector("#vc-first").disabled=M<=1;k.querySelector("#vc-prev").disabled=M<=1;k.querySelector("#vc-next").disabled=M>=f;k.querySelector("#vc-last").disabled=M>=f}o(le,"updatePagination");function Xn(){if(!k)ct();k.classList.add("show");G()}o(Xn,"openPanel");function At(){if(q)et();k.classList.remove("show")}o(At,"closePanel");function Jn(){return k}o(Jn,"getPanelEl");return{createPanel:ct,openPanel:Xn,closePanel:At,renderActiveList:G,getPanelEl:Jn}} o(an,"createPanelController"); function cn(t,e,n,r=null){let a=false,c=false,l,m,d,w;let I=0,s=0,p=null,S=0,b=0,_=null;t.addEventListener("mousedown",E=>{a=true;c=false;l=E.clientX;m=E.clientY;d=parseFloat(e.style.right)||0;w=parseFloat(e.style.bottom)||0;I=e.offsetWidth;s=e.offsetHeight;S=d;b=w;_=typeof r==="function"?r():r;e.style.transition="none";document.body.style.cursor="grabbing";E.preventDefault()});document.addEventListener("mousemove",E=>{if(!a)return;const i=E.clientX-l,u=E.clientY-m;if(Math.abs(i)>3||Math.abs(u)>3)c=true;if(_!=="vertical"){S=Math.max(0,Math.min(window.innerWidth-I,d-i))}if(_!=="horizontal"){b=Math.max(0,Math.min(window.innerHeight-s,w-u))}if(p===null){p=requestAnimationFrame(()=>{p=null;e.style.right=S+"px";e.style.bottom=b+"px"})}});document.addEventListener("mouseup",()=>{if(!a)return;a=false;document.body.style.cursor="";if(p!==null){cancelAnimationFrame(p);p=null}e.style.right=S+"px";e.style.bottom=b+"px";void e.offsetWidth;e.style.transition="";GM_setValue(n(),{right:parseFloat(e.style.right)||0,bottom:parseFloat(e.style.bottom)||0})});t.addEventListener("click",E=>{if(c){E.preventDefault();E.stopPropagation();c=false}},true)} o(cn,"initFloatDrag"); function sn(t,e,n){let r=false,a=false,c,l,m,d;let w=0,I=0,s=null,p=0,S=0;t.addEventListener("mousedown",b=>{if(!e)return;r=true;a=false;c=b.clientX;l=b.clientY;m=parseFloat(e.style.right)||0;d=parseFloat(e.style.top)||0;w=e.offsetWidth;I=e.offsetHeight;e.classList.add("dragging");document.body.style.cursor="grabbing";b.preventDefault()});document.addEventListener("mousemove",b=>{if(!r)return;const _=b.clientX-c,E=b.clientY-l;if(Math.abs(_)>3||Math.abs(E)>3)a=true;p=Math.max(0,Math.min(window.innerWidth-w,m-_));S=Math.max(0,Math.min(window.innerHeight-I,d+E));if(s===null){s=requestAnimationFrame(()=>{s=null;e.style.right=p+"px";e.style.top=S+"px"})}});document.addEventListener("mouseup",()=>{if(!r)return;r=false;document.body.style.cursor="";if(s!==null){cancelAnimationFrame(s);s=null;e.style.right=p+"px";e.style.top=S+"px"}e.classList.remove("dragging");GM_setValue(n(),{right:parseFloat(e.style.right)||0,top:parseFloat(e.style.top)||0})});t.addEventListener("click",b=>{if(a){b.preventDefault();b.stopPropagation();a=false}},true)} o(sn,"initXjumpDrag"); function ln(t){const{positionKeyFn:e,collapseKeyFn:n,collapseText:r,listBtnText:a,onWant:c,onWatched:l,onOpenPanel:m,isDetailPageFn:d,updateButtonStateFn:w,onVisibilityChange:I}=t;let s,p,S,b,_;let E="";let i=null;function u(){E=n?n():"";s=document.createElement("div");s.className="vc-btn-group";const y=GM_getValue(e(),null);if(y){s.style.right=y.right+"px";s.style.bottom=y.bottom+"px"}else{s.style.right="20px";s.style.bottom="20px"}p=document.createElement("button");p.className="vc-btn vc-collapse-btn";p.title="\u62D6\u52A8\u53EF\u79FB\u52A8\u4F4D\u7F6E\uFF0C\u70B9\u51FB\u6536\u8D77/\u5C55\u5F00";p.innerHTML=`${r}`;const A=g("\u2B50 \u60F3\u770B");S=document.createElement("button");S.className="vc-btn vc-btn-want";S.innerHTML=A.html;S.title=A.label;S.onclick=c;const k=g("\u2713 \u5DF2\u770B");b=document.createElement("button");b.className="vc-btn vc-btn-watched";b.innerHTML=k.html;b.title=k.label;b.onclick=l;const q=g(a);_=document.createElement("button");_.className="vc-btn vc-btn-list";_.innerHTML=q.html;_.title=q.label;_.onclick=m;s.appendChild(p);s.appendChild(S);s.appendChild(b);s.appendChild(_);document.body.appendChild(s);cn(p,s,e,()=>s.classList.contains("vc-collapsed")?"vertical":null);p.addEventListener("click",()=>{const P=!GM_getValue(E,false);GM_setValue(E,P);x()});w();x();document.addEventListener("visibilitychange",()=>{if(document.hidden)return;w();const P=GM_getValue(e(),null);if(P){s.style.right=P.right+"px";s.style.bottom=P.bottom+"px"}x();if(I)I()});window.addEventListener("resize",()=>{if(!s)return;if(GM_getValue(E,false))h();else C()})}o(u,"create");function x(){if(!S||!b)return;const y=GM_getValue(E,false);s.classList.toggle("vc-collapsed",y);if(y){S.style.display="none";b.style.display="none";_.style.display="none";h();clearTimeout(i);i=setTimeout(()=>{if(!GM_getValue(E,false))return;h()},260)}else{clearTimeout(i);if(!p.querySelector(".vc-collapse-icon")){p.innerHTML=`${r}`}if(!d()){S.style.display="none";b.style.display="none";_.style.display=""}else{S.style.display="";b.style.display="";_.style.display=""}}if(!y)C()}o(x,"updateVisibility");function h(){if(!s)return;const y=s.offsetWidth;if(!y)return;const A=parseFloat(s.style.right)||0;const k=A;const q=window.innerWidth-A-y;const P=k<=q?0:Math.max(0,window.innerWidth-y);s.style.right=P+"px";p.classList.toggle("vc-collapse-btn-left",P>0);GM_setValue(e(),{right:P,bottom:parseFloat(s.style.bottom)||0})}o(h,"snapToEdge");function g(y){const A=(y||"").match(/^(\S+)\s*(.*)$/);const k=A?A[1]:"";const q=A?A[2]:y||"";return{html:`${k}${q}`,label:q}}o(g,"iconLabel");function C(){if(!s)return;const y=s.offsetWidth;const A=s.offsetHeight;if(!y||!A)return;let k=parseFloat(s.style.right)||0;let q=parseFloat(s.style.bottom)||0;k=Math.max(0,Math.min(k,window.innerWidth-y));q=Math.max(0,Math.min(q,window.innerHeight-A));s.style.right=k+"px";s.style.bottom=q+"px";GM_setValue(e(),{right:k,bottom:q})}o(C,"clampInViewport");return{create:u,updateVisibility:x,getWantBtn:o(()=>S,"getWantBtn"),getWatchedBtn:o(()=>b,"getWatchedBtn")}} o(ln,"createFloatButtonGroup"); function dn(t){const{getSiteFn:e,buildItemFn:n,getIdFn:r,isFavoritedFn:a,toggleFavoriteFn:c,refreshItemFn:l,afterToggleFn:m}=t;let d=null;let w=null;let I=false;function s(){p();[500,1500,3e3].forEach(_=>setTimeout(p,_));if(!d){d=new MutationObserver(()=>{if(w)return;w=setTimeout(()=>{w=null;p()},150)});d.observe(document.body,{childList:true,subtree:true})}if(!I){I=true;document.addEventListener("mouseover",_=>{const E=e();if(!E||!E.listCardSelector)return;const i=_.target.closest(E.listCardSelector);if(!i||i.querySelector(".vc-mini-fav"))return;p()})}}o(s,"inject");function p(){const _=e();if(!_||!_.getListCards)return;let E=false;_.getListCards().forEach(i=>{const{element:u}=i;if(!u||u.querySelector(".vc-mini-fav"))return;const x=n(i,_);if(!x)return;if(getComputedStyle(u).position==="static"){u.style.position="relative"}u.classList.add("vc-fav-host");const h=document.createElement("div");h.className="vc-mini-fav";const g=[];h.appendChild(S("vc-mini-want","\u2B50","\u60F3\u770B","want",x,g));h.appendChild(S("vc-mini-watched","\u2713","\u5DF2\u770B","watched",x,g));u.appendChild(h);E=true});if(E)b()}o(p,"injectCards");function S(_,E,i,u,x,h){const g=document.createElement("button");g.type="button";g.className=`vc-mini-btn ${_}`;g.title=i;g.textContent=E;g.dataset.vcId=r(x);g.dataset.vcType=u;const C=o(()=>g.classList.toggle("active",a(r(x),u)),"refresh");C();h.push(C);g.addEventListener("click",y=>{y.preventDefault();y.stopPropagation();if(l)l(x,e(),g);c(x,u);b();if(m)m()});return g}o(S,"makeBtn");function b(){document.querySelectorAll(".vc-mini-btn[data-vc-id]").forEach(_=>{const E=_.dataset.vcId;const i=_.dataset.vcType;if(E&&i)_.classList.toggle("active",a(E,i))})}o(b,"refreshAll");return{inject:s,refreshAll:b}} o(dn,"createMiniButtonInjector"); function un(t){const{getSiteFn:e,getKeywordFn:n,getPositionKeyFn:r,getAllSitesFn:a,pickDomainFn:c,findAliveDomainFn:l,siteIdField:m}=t;let d=null;function w(){if(!d)return;const p=d.offsetWidth;const S=d.offsetHeight;if(!p||!S)return;let b=parseFloat(d.style.right)||0;let _=parseFloat(d.style.top)||0;b=Math.max(0,Math.min(b,window.innerWidth-p));_=Math.max(0,Math.min(_,window.innerHeight-S));d.style.right=b+"px";d.style.top=_+"px";GM_setValue(r(),{right:b,top:_})}o(w,"clampInViewport");if(!window.__vcXjumpResizeBound){window.__vcXjumpResizeBound=true;window.addEventListener("resize",w)}function I(){const p=e();if(!p)return;const S=n();if(!S)return;if(d&&d.dataset.keyword===S)return;if(d)d.remove();d=document.createElement("div");d.className="vc-xjump";d.dataset.keyword=S;const b=GM_getValue(r(),null);if(b){d.style.right=b.right+"px";d.style.top=b.top+"px"}else{d.style.right="16px";d.style.top="16px"}const _=document.createElement("button");_.className="vc-xjump-toggle";_.innerHTML='\u{1F517}\u8DE8\u7AD9\u76F4\u8FBE';const E=document.createElement("div");E.className="vc-xjump-menu";const i=a();i.filter(h=>h[m]!==p[m]&&h.crossSiteTarget!==false).forEach(h=>{const g=document.createElement("a");g.className="vc-xjump-btn";g.textContent=h.name;g.target="_blank";g.rel="noopener noreferrer";g.href="https://"+c(h)+h.searchPath(S);if(typeof l==="function"){g.addEventListener("mouseenter",()=>{Promise.resolve(l(h)).catch(()=>{})},{once:true});g.addEventListener("click",C=>{if(C.button!==0||C.metaKey||C.ctrlKey||C.shiftKey||C.altKey)return;C.preventDefault();Promise.resolve(l(h)).then(y=>{const A=y?"https://"+y+h.searchPath(S):g.href;window.open(A,"_blank","noopener,noreferrer")})})}E.appendChild(g)});d.appendChild(_);d.appendChild(E);document.body.appendChild(d);sn(_,d,r);const u=d;let x=null;u.addEventListener("mouseenter",()=>{if(u.classList.contains("dragging"))return;if(x){clearTimeout(x);x=null}u.classList.add("show");requestAnimationFrame(()=>{const h=_.getBoundingClientRect();const g=window.innerHeight-h.bottom;const C=E.offsetHeight;u.classList.toggle("up",g{if(u.classList.contains("dragging"))return;if(x)clearTimeout(x);x=setTimeout(()=>u.classList.remove("show"),150)})}o(I,"inject");function s(){return d}o(s,"getXjumpEl");return{inject:I,getXjumpEl:s}} o(un,"createCrossSiteJump"); var pn=`.ad-box, .bcpic2 { display: none !important; } iframe[src*="jads.co"], iframe[src*="adshow.php"] { display: none !important; } .topbanner1, #topbanner11 { display: none !important; } .sidebanner1, #sidebanner11 { display: none !important; } #middlebanner11, #middletextbanner { display: none !important; } #float-ad { display: none !important; } #fuck-u { display: none !important; } .artplayer-plugin-ads { display: none !important; } .t-img-box, #iaujwnefhw { display: none !important; } .mi_btcon.ad, .module-adslist, .ads_w, .footerad, .right-ad, .close-ads, .gg-icon { display: none !important; }`; var mn="adBlockEnabled"; function ee(){return GM_getValue(mn,true)} o(ee,"isAdBlockEnabled"); function ne(){const t="vc-adblock-style";if(!ee()){const r=document.getElementById(t);if(r)r.remove();return}if(document.getElementById(t))return;const e=document.createElement("style");e.id=t;e.textContent=pn;const n=o(()=>{const r=document.head||document.documentElement;if(r){r.appendChild(e);return true}return false},"tryInject");if(!n()){const r=new MutationObserver(()=>{if(n())r.disconnect()});try{r.observe(document,{childList:true,subtree:true})}catch(a){requestAnimationFrame(n)}setTimeout(()=>r.disconnect(),3e3)}} o(ne,"applyAdBlock"); function vn(t){GM_setValue(mn,!!t);ne()} o(vn,"setAdBlockEnabled"); var ft={favOpacity:{key:"video_collector_ui_fav_opacity",def:60,min:0,max:100,step:5},favSize:{key:"video_collector_ui_fav_size",def:"large"},xjumpOpacity:{key:"video_collector_ui_xjump_opacity",def:60,min:0,max:100,step:5},xjumpSize:{key:"video_collector_ui_xjump_size",def:"large"}}; var fn="vc-ui-style"; function tt(t){const e=ft[t];const n=GM_getValue(e.key,e.def);if(e.min!=null){const r=Number(n);return Number.isFinite(r)?Math.min(e.max,Math.max(e.min,r)):e.def}return n==="small"?"small":"large"} o(tt,"getUiSetting"); function at(){const t=Number(tt("favOpacity"))/100;const e=Number(tt("xjumpOpacity"))/100;let n=document.getElementById(fn);if(!n){n=document.createElement("style");n.id=fn;(document.head||document.documentElement).appendChild(n)}n.textContent=`:root{--vc-fav-opacity:${t};--vc-xjump-opacity:${e};}`;document.documentElement.classList.toggle("vc-fav-sm",tt("favSize")==="small");document.documentElement.classList.toggle("vc-xjump-sm",tt("xjumpSize")==="small")} o(at,"applyUiStyles"); function hn(t){GM_setValue(ft.favOpacity.key,Number(t));at()} o(hn,"setFavOpacity"); function gn(t){GM_setValue(ft.favSize.key,t);at()} o(gn,"setFavSize"); function yn(t){GM_setValue(ft.xjumpOpacity.key,Number(t));at()} o(yn,"setXjumpOpacity"); function bn(t){GM_setValue(ft.xjumpSize.key,t);at()} o(bn,"setXjumpSize"); function xn(t,e){if(!t)return;t.querySelectorAll(".vc-settings-seg-btn").forEach(n=>{n.addEventListener("click",()=>{t.querySelectorAll(".vc-settings-seg-btn").forEach(r=>r.classList.remove("is-active"));n.classList.add("is-active");e(n.dataset.val)})})} o(xn,"bindSeg"); function jr(t,e){if(!t)return;t.querySelectorAll(".vc-settings-seg-btn").forEach(n=>{n.classList.toggle("is-active",n.dataset.val===e)})} o(jr,"syncSeg"); function wn(){let t=null;function e(){if(!t)c();r();t.classList.add("show")}o(e,"open");function n(){if(t)t.classList.remove("show")}o(n,"close");function r(){t.querySelector("#vc-settings-adblock").checked=ee();a("fav","vc-settings-fav-opacity","vc-settings-fav-size");a("xjump","vc-settings-xjump-opacity","vc-settings-xjump-size")}o(r,"syncControls");function a(m,d,w){const I=t.querySelector("#"+d);const s=t.querySelector("."+d+"-val");const p=t.querySelector("#"+w);const S=tt(m+"Opacity");if(I)I.value=S;if(s)s.textContent=S+"%";jr(p,tt(m+"Size"))}o(a,"syncSettingGroup");function c(){t=document.createElement("div");t.className="vc-settings-mask";t.innerHTML=` `;document.body.appendChild(t);t.querySelector(".vc-settings-close").addEventListener("click",n);t.addEventListener("click",m=>{if(m.target===t)n()});document.addEventListener("keydown",m=>{if(m.key==="Escape"&&t.classList.contains("show"))n()});t.querySelector("#vc-settings-adblock").addEventListener("change",m=>{vn(m.target.checked)});l("vc-settings-fav-opacity","vc-settings-fav-opacity-val",hn);xn(t.querySelector("#vc-settings-fav-size"),gn);l("vc-settings-xjump-opacity","vc-settings-xjump-opacity-val",yn);xn(t.querySelector("#vc-settings-xjump-size"),bn)}o(c,"build");function l(m,d,w){const I=t.querySelector("#"+m);const s=t.querySelector("."+d);if(!I)return;I.addEventListener("input",()=>{if(s)s.textContent=I.value+"%";w(I.value)})}o(l,"bindRange");return{open:e,close:n}} o(wn,"createSettingsPanel"); var Sn=`:root { --vc-primary: #6366f1; --vc-primary-light: #a5b4fc; --vc-primary-lighter: #e0e7ff; --vc-primary-dark: #4338ca; --vc-collapse-bg: #008080; --vc-want: #fb923c; --vc-want-light: #fdba74; --vc-want-lighter: #fff7ed; --vc-want-dark: #c2410c; --vc-watched: #34d399; --vc-watched-light: #6ee7b7; --vc-watched-lighter: #f0fdf4; --vc-watched-dark: #047857; --vc-danger: #f87171; --vc-danger-light: #fca5a5; --vc-danger-lighter: #fef2f2; --vc-danger-dark: #b91c1c; --vc-bg: #ffffff; --vc-bg-soft: #fafafa; --vc-bg-muted: #f5f5f5; --vc-text: #18181b; --vc-text-medium: #3f3f46; --vc-text-secondary: #71717a; --vc-text-placeholder: #a1a1aa; --vc-border: #e4e4e7; --vc-border-light: #f4f4f5; --vc-border-dark: #d4d4d8; --vc-track: rgba(0, 0, 0, 0.08); --vc-hover: #f4f4f5; --vc-hover-strong: #e4e4e7; --vc-shadow: 0 2px 12px rgba(0, 0, 0, 0.06); --vc-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.07); --vc-shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.10); }`; var kn=`.vc-mask { position: fixed; inset: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.3); z-index: 100000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(2px); margin: 0; padding: 0; } .vc-mask.show { display: flex !important; } .vc-settings-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.3); z-index: 100001; display: none; align-items: center; justify-content: center; backdrop-filter: blur(2px); } .vc-settings-mask.show { display: flex !important; } @keyframes vcFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } .vc-image-preview { position: fixed; inset: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.85); z-index: 100001; display: none; align-items: center; justify-content: center; cursor: zoom-out; margin: 0; padding: 0; } .vc-image-preview.show { display: flex !important; } .vc-image-preview img { max-width: 92vw; max-height: 92vh; object-fit: contain; border-radius: 4px; } .vc-jb-jump { display: inline-block; margin-left: 8px; padding: 2px 10px; font-size: 12px; font-weight: 500; color: #fff !important; background: var(--vc-primary); border-radius: 6px; text-decoration: none; cursor: pointer; vertical-align: middle; transition: opacity 0.15s, transform 0.15s; } .vc-jb-jump:hover { opacity: 0.88; transform: translateY(-1px); }`; var _n=`.vc-btn-group { position: fixed; z-index: 99999; display: flex; flex-direction: column; gap: 8px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; user-select: none; opacity: var(--vc-fav-opacity, 0.6); transition: right 0.25s ease, bottom 0.25s ease, transform 0.25s ease, opacity 0.15s ease; } .vc-btn-group:hover { opacity: 1; } .vc-btn-group.vc-collapsed { transition: right 0.25s ease, bottom 0.25s ease, transform 0.25s ease, opacity 0.15s ease; } .vc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 6px 10px; border: 1px solid var(--vc-border); border-radius: 10px; font-size: 13px; font-weight: 500; line-height: 1.4; cursor: pointer; transition: all 0.2s ease; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); box-shadow: var(--vc-shadow); color: var(--vc-text-secondary); white-space: nowrap; } .vc-btn:hover { transform: translateY(-1px); color: var(--vc-text); } .vc-btn-want.active { background: var(--vc-want); color: white; border-color: var(--vc-want); } .vc-btn-watched.active { background: var(--vc-watched); color: white; border-color: var(--vc-watched); } .vc-btn-list:hover { background: var(--vc-primary); color: white; border-color: var(--vc-primary); } .vc-collapse-btn { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 6px 10px; height: 32px; max-width: 200px; box-sizing: border-box; overflow: hidden; font-size: 12px; text-align: center; cursor: grab; transition: height 0.25s ease, max-width 0.25s ease, border-radius 0.25s ease, padding 0.25s ease, opacity 0.25s ease; } .vc-collapse-icon { display: inline-block; transform: rotate(90deg); line-height: 1; font-style: normal; } .vc-btn-group.vc-collapsed .vc-collapse-btn { min-width: 30px; max-width: 30px; height: 40px; padding: 0; border-radius: 50% 0 0 50%; font-size: 16px; border: none; outline: none; background: var(--vc-collapse-bg); color: #fff; } .vc-btn-group.vc-collapsed .vc-collapse-icon { transform: rotate(0deg); } .vc-btn-group.vc-collapsed .vc-collapse-btn.vc-collapse-btn-left { min-width: 40px; border-radius: 0 50% 50% 0; } .vc-fav-sm .vc-btn-group { gap: 4px; } .vc-fav-sm .vc-btn-want .vc-btn-label, .vc-fav-sm .vc-btn-watched .vc-btn-label, .vc-fav-sm .vc-btn-list .vc-btn-label { display: none; } .vc-fav-sm .vc-btn-want, .vc-fav-sm .vc-btn-watched, .vc-fav-sm .vc-btn-list { min-width: 34px; padding: 6px 8px; } .vc-mini-fav { position: absolute; top: 6px; left: 6px; display: flex; gap: 4px; opacity: 0; pointer-events: none; transition: opacity 0.15s ease; z-index: 10; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; } .vc-fav-host:hover .vc-mini-fav, .vc-mini-fav:hover { opacity: 1; pointer-events: auto; } .vc-mini-btn { width: 26px; height: 26px; padding: 0; border: none; border-radius: 6px; background: rgba(255, 255, 255, 0.92); color: var(--vc-text-secondary); font-size: 13px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18); transition: transform 0.15s, background 0.15s, color 0.15s; } .vc-mini-btn:hover { transform: scale(1.12); } .vc-mini-want:hover { color: var(--vc-want); } .vc-mini-watched:hover { color: var(--vc-watched); } .vc-mini-want.active { background: var(--vc-want); color: #fff; } .vc-mini-watched.active { background: var(--vc-watched); color: #fff; } .vc-xjump { position: fixed; z-index: 99999; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; opacity: var(--vc-xjump-opacity, 0.6); transition: opacity 0.15s ease; } .vc-xjump:hover, .vc-xjump.show { opacity: 1; } .vc-xjump-toggle { display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px; border: 1px solid var(--vc-border); border-radius: 8px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); box-shadow: var(--vc-shadow); color: var(--vc-text-secondary); font-size: 13px; font-weight: 500; cursor: grab; white-space: nowrap; user-select: none; transition: transform 0.15s ease; } .vc-xjump-toggle:hover, .vc-xjump.show .vc-xjump-toggle { transform: translateY(-1px); } .vc-xjump-sm .vc-xjump-toggle .vc-xjump-label { display: none; } .vc-xjump-sm .vc-xjump-toggle { padding: 8px 10px; } .vc-xjump-menu { position: absolute; top: calc(100% + 6px); right: 0; display: none; flex-direction: column; gap: 4px; background: rgba(255, 255, 255, 0.98); border: 1px solid var(--vc-border); border-radius: 10px; box-shadow: var(--vc-shadow-lg); padding: 6px; max-height: 60vh; overflow: auto; min-width: 102px; box-sizing: border-box; } .vc-xjump.up .vc-xjump-menu { top: auto; bottom: calc(100% + 6px); } .vc-xjump.show .vc-xjump-menu { display: flex; } .vc-xjump-btn { padding: 6px 12px; border: none; border-radius: 6px; background: transparent; color: var(--vc-text-secondary); font-size: 12px; font-weight: 500; text-decoration: none; cursor: pointer; text-align: left; white-space: nowrap; transition: background 0.15s, color 0.15s; } .vc-xjump-btn:hover { background: var(--vc-primary); color: #fff; }`; var En=`.vc-settings-panel { width: 420px; max-width: 92vw; background: var(--vc-bg); border-radius: 16px; box-shadow: var(--vc-shadow-lg); overflow: hidden; animation: vcFadeIn 0.2s ease; } .vc-settings-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--vc-border); } .vc-settings-title { font-size: 15px; font-weight: 600; color: var(--vc-text); } .vc-settings-close { width: 28px; height: 28px; border: none; border-radius: 8px; background: transparent; color: var(--vc-text-secondary); font-size: 18px; line-height: 1; cursor: pointer; transition: background 0.15s ease, color 0.15s ease; } .vc-settings-close:hover { background: var(--vc-bg-soft); color: var(--vc-text); } .vc-settings-body { padding: 12px 20px 20px; } .vc-settings-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; cursor: pointer; transition: background 0.15s ease; } .vc-settings-item:hover { background: var(--vc-bg-soft); } .vc-settings-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; } .vc-settings-label { font-size: 14px; font-weight: 500; color: var(--vc-text); } .vc-settings-desc { font-size: 12px; color: var(--vc-text-secondary); } .vc-settings-section { padding-top: 2px; } .vc-settings-section + .vc-settings-section { margin-top: 6px; border-top: 1px solid var(--vc-border-light); } .vc-settings-section-title { font-size: 12px; font-weight: 600; color: var(--vc-text-placeholder); padding: 8px 12px 4px; letter-spacing: 0.5px; } .vc-settings-item .vc-switch { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; pointer-events: none; } .vc-settings-switch-track { position: relative; flex-shrink: 0; width: 40px; height: 22px; border-radius: 999px; background: var(--vc-bg-muted); border: 1px solid var(--vc-border); box-sizing: border-box; cursor: pointer; transition: background 0.18s ease, border-color 0.18s ease; } .vc-settings-switch-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform 0.18s ease; } .vc-switch:checked + .vc-settings-info + .vc-settings-switch-track { background: var(--vc-primary); border-color: var(--vc-primary); } .vc-switch:checked + .vc-settings-info + .vc-settings-switch-track::after { transform: translateX(18px); } .vc-switch:focus-visible + .vc-settings-info + .vc-settings-switch-track { outline: 2px solid var(--vc-primary); outline-offset: 2px; } .vc-settings-range-wrap { display: flex; align-items: center; gap: 8px; flex-shrink: 0; } .vc-settings-range-val { min-width: 38px; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--vc-text-secondary); } .vc-settings-item .vc-settings-range { display: block; -webkit-appearance: none; appearance: none; width: 150px; height: 8px; margin: 0; padding: 0; border: none; border-radius: 999px; background: var(--vc-track, rgba(0, 0, 0, 0.1)); background-image: none; font-size: inherit; line-height: normal; color: var(--vc-text-secondary); vertical-align: middle; box-sizing: border-box; outline: none; cursor: pointer; } .vc-settings-item .vc-settings-range::-webkit-slider-runnable-track { -webkit-appearance: none; height: 8px; border-radius: 999px; background: transparent; } .vc-settings-item .vc-settings-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; margin-top: -4px; background: var(--vc-primary); border: 2px solid rgba(255, 255, 255, 0.95); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); cursor: pointer; } .vc-settings-item .vc-settings-range::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--vc-primary); border: 2px solid rgba(255, 255, 255, 0.95); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); cursor: pointer; } .vc-settings-item .vc-settings-range::-moz-range-track { height: 8px; border-radius: 999px; background: transparent; } .vc-settings-seg { display: inline-flex; flex-shrink: 0; border: 1px solid var(--vc-border); border-radius: 8px; overflow: hidden; background: var(--vc-bg-soft); } .vc-settings-seg-btn { padding: 6px 12px; border: none; background: transparent; color: var(--vc-text-secondary); font-size: 12px; font-weight: 500; cursor: pointer; transition: background 0.15s ease, color 0.15s ease; } .vc-settings-seg-btn + .vc-settings-seg-btn { border-left: 1px solid var(--vc-border); } .vc-settings-seg-btn.is-active { background: var(--vc-primary); color: #fff; } .vc-settings-seg-btn:focus-visible { outline: 2px solid var(--vc-primary-lighter); outline-offset: -2px; }`; var Ln=`.vc-panel { width: 980px; max-width: 92vw; height: 88vh; min-height: 400px; background: var(--vc-bg); border-radius: 16px; box-shadow: var(--vc-shadow-lg); display: flex; flex-direction: column; overflow: hidden; animation: vcFadeIn 0.2s ease; position: relative; border: 1px solid var(--vc-border); } .vc-panel-header { padding: 20px 56px 16px 24px; border-bottom: 1px solid var(--vc-border); flex-shrink: 0; } .vc-panel-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; } .vc-panel-title { font-size: 18px; font-weight: 600; color: var(--vc-text); margin: 0; } .vc-header-actions { display: flex; gap: 8px; } .vc-icon-btn-sm { padding: 6px 12px; border: 1px solid var(--vc-border); background: white; border-radius: 8px; font-size: 12px; cursor: pointer; color: var(--vc-text-secondary); transition: all 0.15s; } .vc-icon-btn-sm:hover { border-color: var(--vc-primary); color: var(--vc-primary); } .vc-tabs { display: flex; gap: 24px; margin-bottom: 12px; } .vc-tab { padding: 6px 0; font-size: 14px; color: var(--vc-text-secondary); cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.2s; } .vc-tab.active { color: var(--vc-primary); border-bottom-color: var(--vc-primary); font-weight: 500; } .vc-search { flex: 1; min-width: 0; width: auto; padding: 8px 12px; border: 1px solid var(--vc-border); border-radius: 8px; font-size: 13px; outline: none; transition: border-color 0.2s; box-sizing: border-box; background: var(--vc-bg); } .vc-search:focus { border-color: var(--vc-primary); } .vc-search-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; } .vc-site-select { flex-shrink: 0; max-width: 140px; padding: 8px 6px; border: 1px solid var(--vc-border); border-radius: 8px; font-size: 12px; color: var(--vc-text); background: var(--vc-bg); outline: none; cursor: pointer; transition: border-color 0.2s; box-sizing: border-box; } .vc-site-select:focus { border-color: var(--vc-primary); } .vc-list-wrap { flex: 1; overflow-y: auto; padding: 20px 24px; display: none; box-sizing: border-box; } .vc-list-wrap.active { display: block; } .vc-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(3, minmax(160px, 1fr)); gap: 16px; height: 100%; width: 100%; } .vc-card { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--vc-border); background: white; transition: all 0.2s ease; cursor: pointer; display: flex; flex-direction: column; max-height: 260px; } .vc-card:hover { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08); transform: translateY(-2px); } .vc-card-cover { flex: 1; min-height: 0; background: #f3f4f6; display: flex; align-items: center; justify-content: center; overflow: hidden; } .vc-card-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center top; cursor: zoom-in; transition: transform 0.2s; } .vc-card:hover .vc-card-cover img { transform: scale(1.05); } .vc-card-cover .vc-default-cover { color: #9ca3af; font-size: 28px; } .vc-card-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity 0.2s ease; z-index: 2; } .vc-card:hover .vc-card-actions { opacity: 1; } .vc-card-action-btn { padding: 4px 8px; border: none; background: rgba(255, 255, 255, 0.95); border-radius: 6px; font-size: 11px; cursor: pointer; color: var(--vc-text-secondary); backdrop-filter: blur(4px); transition: all 0.15s; } .vc-card-action-btn:hover { background: var(--vc-primary); color: white; } .vc-card-delete-btn:hover { background: var(--vc-danger); color: white; } .vc-card-info { padding: 8px 10px 10px; flex-shrink: 0; } .vc-card-title { font-size: 12px; line-height: 1.4; color: var(--vc-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 500; } .vc-card-copy { display: inline-block; border: none; background: transparent; cursor: pointer; font-size: 11px; line-height: 1; padding: 0; margin: 0; margin-top: -2px; border-radius: 4px; vertical-align: middle; opacity: 0.55; transition: opacity 0.15s, background 0.15s; } .vc-card-copy:hover { opacity: 1; background: rgba(79, 70, 229, 0.1); } .vc-card-site { display: inline-block; font-size: 11px; color: var(--vc-primary); background: rgba(79, 70, 229, 0.1); padding: 1px 6px; border-radius: 4px; white-space: nowrap; vertical-align: middle; margin-right: 4px; } .vc-card-site:empty { display: none; } .vc-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 4px; min-width: 0; } .vc-card-time { font-size: 11px; color: var(--vc-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; } .vc-card-last-played { font-size: 11px; color: var(--vc-want); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; } .vc-card-last-played:empty { display: none; } .vc-card-mark { position: absolute; top: 6px; left: 6px; width: 26px; height: 26px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 13px; line-height: 1; color: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18); opacity: 0; transition: opacity 0.2s ease; pointer-events: none; z-index: 2; } .vc-card:hover .vc-card-mark { opacity: 1; } .vc-card-mark.is-want { background: var(--vc-want); } .vc-card-mark.is-watched { background: var(--vc-watched); } .vc-panel.batch-mode .vc-card-mark { display: none; } .vc-empty { grid-column: 1 / -1; grid-row: 1 / -1; display: flex; align-items: center; justify-content: center; color: var(--vc-text-secondary); font-size: 14px; } .vc-pagination { padding: 12px 24px; border-top: 1px solid var(--vc-border); display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--vc-text-secondary); flex-shrink: 0; } .vc-pagination-btns { display: flex; align-items: center; gap: 8px; } .vc-page-btn { padding: 4px 10px; border: 1px solid var(--vc-border); background: white; border-radius: 6px; font-size: 12px; cursor: pointer; color: var(--vc-text-secondary); transition: all 0.15s; } .vc-page-btn:hover:not(:disabled) { border-color: var(--vc-primary); color: var(--vc-primary); } .vc-page-btn:disabled { opacity: 0.4; cursor: not-allowed; } .vc-close { position: absolute; top: 16px; right: 20px; background: none; border: none; font-size: 20px; color: var(--vc-text-secondary); cursor: pointer; line-height: 1; padding: 4px; z-index: 2; } .vc-close:hover { color: var(--vc-text); } .vc-card-checkbox { position: absolute; top: 6px; left: 6px; z-index: 3; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; } .vc-card-checkbox input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--vc-primary); } .vc-panel.batch-mode .vc-card-checkbox { display: flex !important; } .vc-panel.batch-mode .vc-card-actions { display: none !important; } .vc-panel.batch-mode .vc-card-copy { display: none !important; } .vc-panel.batch-mode .vc-card { cursor: default; } .vc-card.selected { box-shadow: 0 0 0 2px var(--vc-primary); } .vc-batch-bar { padding: 12px 24px; border-top: 1px solid var(--vc-border); display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--vc-text-secondary); flex-shrink: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--vc-hover); } .vc-batch-select-all { display: flex; align-items: center; gap: 4px; cursor: pointer; white-space: nowrap; font-weight: 500; } .vc-batch-select-all input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--vc-primary); } .vc-batch-count { color: var(--vc-primary); font-weight: 600; white-space: nowrap; } .vc-batch-actions { margin-left: auto; display: flex; gap: 6px; } .vc-batch-btn { padding: 4px 12px; border: 1px solid var(--vc-border); background: white; border-radius: 6px; font-size: 12px; font-weight: 500; cursor: pointer; color: var(--vc-text-secondary); transition: all 0.15s; font-family: inherit; } .vc-batch-btn:hover:not(:disabled) { border-color: var(--vc-primary); color: var(--vc-primary); } .vc-batch-btn:disabled { opacity: 0.4; cursor: not-allowed; } .vc-batch-btn-danger:hover:not(:disabled) { border-color: var(--vc-danger); color: var(--vc-danger); } .vc-batch-btn-ghost { border-color: transparent; background: transparent; } .vc-batch-btn-ghost:hover { color: var(--vc-text) !important; border-color: var(--vc-border) !important; } .vc-panel.batch-mode .vc-pagination { display: none; }`; var Tn=`.vc-confirm-mask { position: fixed; inset: 0; z-index: 100002; background: rgba(0, 0, 0, 0.35); display: none; align-items: center; justify-content: center; backdrop-filter: blur(2px); } .vc-confirm-mask.show { display: flex !important; } .vc-confirm-dialog { width: 375px; max-width: 90vw; background: white; border-radius: 12px; box-shadow: var(--vc-shadow-lg); padding: 24px; text-align: center; animation: vcFadeIn 0.15s ease; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; } .vc-confirm-text { font-size: 15px; font-weight: 500; color: var(--vc-text); line-height: 1.5; margin-bottom: 25px; } .vc-confirm-actions { display: flex; gap: 20px; justify-content: center; } .vc-confirm-btn { padding: 7px 20px; border: none; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.15s; font-family: inherit; } .vc-confirm-cancel { background: var(--vc-hover); color: var(--vc-text-secondary); border: 1px solid var(--vc-border); } .vc-confirm-cancel:hover { background: var(--vc-border); color: var(--vc-text); } .vc-confirm-ok { background: var(--vc-primary); color: white; } .vc-confirm-ok:hover { opacity: 0.9; } .vc-confirm-ok.danger { background: var(--vc-danger); } .vc-import-dialog { width: 420px; max-width: 92vw; background: white; border-radius: 12px; box-shadow: var(--vc-shadow-lg); padding: 24px; animation: vcFadeIn 0.15s ease; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; } .vc-import-title { font-size: 16px; font-weight: 600; color: var(--vc-text); margin-bottom: 16px; } .vc-import-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; } .vc-import-option { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; border: 1px solid var(--vc-border); border-radius: 8px; background: #fff; cursor: pointer; text-align: left; transition: border-color 0.15s, background 0.15s; font-family: inherit; } .vc-import-option:hover { border-color: var(--vc-primary); background: rgba(79, 70, 229, 0.04); } .vc-import-option-name { font-size: 14px; font-weight: 500; color: var(--vc-text); } .vc-import-option-desc { font-size: 12px; color: var(--vc-text-secondary); line-height: 1.4; } .vc-import-actions { display: flex; justify-content: center; } .vc-toast { position: fixed; top: 5vh; left: 50%; transform: translateX(-50%) translateY(-8px); z-index: 100010; display: flex; align-items: center; gap: 8px; max-width: 80vw; padding: 10px 14px 12px; background: #fff; color: var(--vc-text); font-size: 13px; font-weight: 500; border-radius: 10px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18); border: 1px solid var(--vc-border); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; opacity: 0; pointer-events: none; overflow: hidden; transition: opacity 0.3s ease, transform 0.3s ease; } .vc-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; animation: vc-toast-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); } @keyframes vc-toast-pop { 0% { opacity: 0; transform: translateX(-50%) translateY(-16px) scale(0.96); } 70% { opacity: 1; transform: translateX(-50%) translateY(3px) scale(1.02); } 100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); } } .vc-toast-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .vc-toast-icon { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--vc-primary-light); color: #fff; } .vc-toast-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--vc-primary-light); transform-origin: left center; opacity: 0; } .vc-toast.show .vc-toast-bar { opacity: 1; animation: vc-toast-progress var(--vc-toast-duration, 6000ms) linear forwards; } @keyframes vc-toast-progress { to { transform: scaleX(0); } } .vc-toast.variant-primary { border-color: var(--vc-primary-light); box-shadow: 0 8px 30px rgba(79, 70, 229, 0.28); } .vc-toast-close { flex-shrink: 0; padding: 0 2px; border: none; background: none; color: var(--vc-text-secondary); font-size: 16px; line-height: 1; cursor: pointer; } .vc-toast-close:hover { color: var(--vc-text); }`; var Ur=[Sn,kn,_n,En,Ln,Tn].join("\n"); var Cn=Ur; var Pn=`
我的收藏
想看
已看
观看记录
共 0 条收藏
1 / 1
`; var In=`
{{categoryHtml}}
{{coverHtml}}
{{siteName}}{{copyBtnHtml}}{{title}}
{{dateStr}} {{lastPlayed}}
`; var An=`{{title}} `; var qn=`
🖼️
`; var Yr={panelTemplate:Pn,cardTemplate:In,coverImageTemplate:An,defaultCoverTemplate:qn}; var Xr={want:{type:"want",icon:"\u2B50",title:"\u60F3\u770B"},watched:{type:"watched",icon:"\u2713",title:"\u5DF2\u770B"}}; var W; var Jr=wn(); var oe=null; function Q(){if(oe)oe()} o(Q,"renderActiveList"); var Tt=an({state:U,pageSize:jt,loadFn:o(()=>({...$(),history:Be()}),"loadFn"),hasHistory:true,filterFn:o((t,e)=>{if(!e)return t;const n=e.toLowerCase();return t.filter(r=>(r.name||"").toLowerCase().includes(n))},"filterFn"),getId:o(t=>t.name,"getId"),getTitle:o(t=>t.name,"getTitle"),getUrl:o(t=>oo(t),"getUrl"),resolveUrlFn:ao,getSiteName:o(t=>{if(!t.siteId)return"";return(Y.find(e=>e.id===t.siteId)||{}).name||""},"getSiteName"),getTime:o(t=>t.updateTime||t.createTime,"getTime"),moveFn:Ze,deleteFn:Je,batchMoveFn:tn,batchDeleteFn:en,exportFn:Fe,importFn:De,updateButtonStateFn:o(()=>K(),"updateButtonStateFn"),getExtraInfo:o(t=>We(mt(t.name)),"getExtraInfo"),getCategoryMark:o(t=>Xr[t.category]||null,"getCategoryMark"),emptyText:"\u6682\u65E0\u6536\u85CF\u5185\u5BB9",templates:Yr}); oe=Tt.renderActiveList; var Rn=Tt.openPanel; var Zr=Tt.closePanel; var re="vc-global-style"; function Vn(){if(!document.getElementById(re)){const t=document.createElement("style");t.id=re;t.textContent=Cn;document.head.appendChild(t)}if(!document.head.dataset.vcStyleWatch){document.head.dataset.vcStyleWatch="1";new MutationObserver(()=>{if(!document.getElementById(re))Vn()}).observe(document.head,{childList:true})}} o(Vn,"injectStyles"); function $n(){Vn();no();Bn();Y.forEach(e=>Ut(e));Ce().then(()=>Y.forEach(e=>Ut(e)));GM_registerMenuCommand("\u6536\u85CF\u5217\u8868",Rn);GM_registerMenuCommand("\u8BBE\u7F6E",()=>Jr.open());let t=location.href;setInterval(()=>{if(location.href!==t){t=location.href;setTimeout(()=>{Bn();K();ro()},500)}},1e3);document.addEventListener("keydown",e=>{var r,a;if(e.key!=="Escape")return;const n=document.querySelector(".vc-image-preview");if(n==null?void 0:n.classList.contains("show")){n.classList.remove("show");return}if((r=ae.getXjumpEl())==null?void 0:r.classList.contains("show")){ae.getXjumpEl().classList.remove("show");return}if((a=Tt.getPanelEl())==null?void 0:a.classList.contains("show"))Zr()})} o($n,"initDrama"); var Qr=2e3; var Mn=0; var zn=false; function Fn(t){var n,r;if(kt().video)return;const e=t.target;if((n=e==null?void 0:e.closest)==null?void 0:n.call(e,'a, button, input, textarea, select, [contenteditable="true"], [class*="vc-"]'))return;vt((r=N())==null?void 0:r.playerFrameSelector,{force:true})} o(Fn,"onPageClick"); function Dn(t){if(t===zn)return;zn=t;if(t)document.addEventListener("click",Fn);else document.removeEventListener("click",Fn)} o(Dn,"bindPageClick"); var jn=nn({getVideo:o(()=>kt().video,"getVideo"),step:_e,volumeStep:Ee,onAction:o(t=>ot(t,{duration:1500}),"onAction"),onNoVideo:o(()=>{var t;if(!vt((t=N())==null?void 0:t.playerFrameSelector,{force:true}))return;if(Date.now()-Mn{const a=r.target.closest("a");if(a&&t.isPlayUrl(a.href))te()})}}if(n){On(t);jn.enable();Dn(true);vt(t.playerFrameSelector);setTimeout(()=>On(N()),1500);[600,1500,3e3].forEach(r=>setTimeout(()=>vt(t.playerFrameSelector),r))}else{Nn();jn.disable();Dn(false)}if(e==="detail"||e==="play")lo();co()} o(Bn,"enhancePage"); function to(){const t=N();return t?`${Ot}_${t.id}`:Ot} o(to,"getPositionKey"); function eo(){const t=N();return t?`${Nt}_${t.id}`:Nt} o(eo,"getCollapseKey"); function no(){W=ln({positionKeyFn:to,collapseKeyFn:eo,collapseText:"\u22EE\u22EE",listBtnText:"\u{1F4CB} \u6536\u85CF\u5217\u8868",onWant:Ye,onWatched:Xe,onOpenPanel:Rn,isDetailPageFn:Qe,updateButtonStateFn:K,onVisibilityChange:io});W.create()} o(no,"createFloatButtons"); function ro(){if(W)W.updateVisibility()} o(ro,"updateButtonVisibility"); function K(){const t=W==null?void 0:W.getWantBtn();const e=W==null?void 0:W.getWatchedBtn();if(!t||!e)return;const n=Et();if(!n){t.classList.remove("active");e.classList.remove("active");return}t.classList.toggle("active",Lt(n,"want"));e.classList.toggle("active",Lt(n,"watched"))} o(K,"updateButtonState"); function oo(t){if(!t.siteId)return"";const e=Y.find(r=>r.id===t.siteId);if(!e)return"";const n=Vt(e);if(!n)return"";return"https://"+n+(t.path||"")} o(oo,"buildDramaUrl"); function ao(t,e){const n=Y.find(r=>r.id===t.siteId);if(!n||!n.domains||!n.domains.length)return Promise.resolve(e||"");return $t(n).then(r=>r?"https://"+r+(t.path||""):e||"")} o(ao,"resolveDramaUrl"); var Un=dn({getSiteFn:N,buildItemFn:o((t,e)=>{const{element:n,name:r,cover:a,path:c}=t;if(!r)return null;return{name:r,cover:a,path:c,siteId:e.id,createTime:Date.now(),updateTime:Date.now(),element:n}},"buildItemFn"),getIdFn:o(t=>t.name,"getIdFn"),isFavoritedFn:Lt,toggleFavoriteFn:Ge,refreshItemFn:o((t,e,n)=>{if(!t.element||!(e==null?void 0:e.getListCards))return;const r=e.getListCards().find(a=>a.element===t.element);if(r&&r.cover)t.cover=r.cover},"refreshItemFn"),afterToggleFn:K}); function co(){Un.inject()} o(co,"injectListFavoriteButtons"); function io(){Un.refreshAll()} o(io,"refreshAllMiniButtons"); function so(){const t=N();return t?`${Bt}_${t.id}`:Bt} o(so,"getXjumpPositionKey"); var ae=un({getSiteFn:N,getKeywordFn:o(()=>{const t=N();if(!t)return null;const e=t.pageType();if(e==="detail"&&t.getDetailInfo)return(t.getDetailInfo()||{}).name||null;if(e==="play"&&t.getPlayInfo)return(t.getPlayInfo()||{}).name||null;return null},"getKeywordFn"),getPositionKeyFn:so,getAllSitesFn:o(()=>Y,"getAllSitesFn"),pickDomainFn:Vt,findAliveDomainFn:$t,siteIdField:"id"}); function lo(){ae.inject()} o(lo,"injectCrossSiteJump"); ne(); at(); function Kn(){if(!N())return;$n()} o(Kn,"init"); if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",Kn)} else{Kn()} })();