name + "</span>";
})).join(""), "</div></div>"));
let a = 0, r = setInterval((function() {
o(), a++ > 100 && clearInterval(r);
}), Math.min(200 + 50 * a, 1e3));
}
function execQuickAddons(n) {
log("execQuickAddons:", n.name || n.match);
let o = STYLES;
n.hide && (o += "".concat(n.hide, " {").concat(PurifyStyle, "}")), n.css && (o += n.css),
addCss(o), $((function() {
if (n.sign && $(n.sign).html(OO_SIGN), n.vip && (addIframe(PlayerCover), window.addEventListener("message", (function(n) {
const o = n.data;
!o || o._id !== MESSAGE_ID || (log("message:", MESSAGE_ID, o), o.action && E.emit(o.action, o));
})), "boolean" != typeof n.vip)) {
(Array.isArray(n.vip) ? n.vip : [ n.vip ]).forEach((function(n) {
insertVipSource((n = n.split(/\s*\|\s*/))[0], n[1]);
}));
}
n.js instanceof Function && n.js();
}));
}
function fixIframeUrl(n) {
return n.replace(/\/?\?.+/, "");
}
function getIframeId(n) {
return iframes[fixIframeUrl(n)];
}
function getIframe(n) {
return frames[fixIframeUrl(n)];
}
function setIframe(n, o) {
iframes[fixIframeUrl(n)] = o;
}
function addIframe(n) {
let o = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "oo-iframes";
log("addIframe:", n, "|", o);
const e = document.createElement("iframe");
return e.id = uuid(), e.frameborder = "0", e.scrolling = "no", e.seamless = !0,
e.sandbox = "allow-scripts allow-same-origin allow-forms", n && (e.src = n, setIframe(n, e.id)),
$(o).append(e), e;
}
function removeIframe() {
let n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "oo-iframes > iframe", o = arguments.length > 1 ? arguments[1] : void 0;
const e = $("string" == typeof n ? n.startsWith("oo-iframes") ? n : "#" + n : n.id ? "#" + n.id : n).get(0);
e && (log("Remove iframe #".concat(e.id, " (").concat(e.src, ")") + (o ? "【".concat(o, "】") : "")),
e.src = "about:blank", $(e).remove());
}
function emptyIframes() {
$("oo-iframes > iframe").each((function(n, o) {
removeIframe(o);
})), $("oo-iframes").empty();
}
function urlDetector() {
setInterval((function() {
!function() {
if (Href !== window.location.href) {
const n = Href;
Href = window.location.href, E.emit("url.change", {
newUrl: Href,
oldUrl: n
});
}
}();
}), 250);
}
function fixM3u8Playing() {
log("fixM3u8Playing");
const n = Date.now();
let o;
const e = setInterval((function() {
const i = Date.now() - n;
(o = document.querySelector("video[src]")) && o.src.endsWith(".m3u8") ? (clearInterval(e),
setTimeout((async function() {
if (0 === o.readyState) {
const n = getGlobal("Hls");
if (!n && await addJs("/hls.js/0.13.2/hls.min.js"), n.isSupported()) {
o.pause();
const e = new n;
e.loadSource(o.src), e.attachMedia(o), e.on(n.Events.MANIFEST_PARSED, (function() {
o.play();
})), isNotTop ? window.parent.postMessage({
_id: MESSAGE_ID,
action: "log",
from: location.href,
origin: location.href,
url: o.src,
parent: !0,
text: "Fix m3u8 play"
}, "*") : log({
from: location.href,
origin: location.href,
url: o.src,
text: "Fix m3u8 play"
});
}
}
}), 1e3)) : i >= 15e3 && clearInterval(e);
}), 100);
}
function sniffInIframe(n) {
log("sniffInIframe"), location.href === PlayerCover && window.top.postMessage({
pageInfo: n,
_id: MESSAGE_ID,
action: "enable.sniff",
from: location.href
}, "*"), window.addEventListener("message", (function(n) {
const o = n.data;
!o || o._id !== MESSAGE_ID || (log("iframe message:", MESSAGE_ID, o), o.parent && (o.from = location.href,
window.parent.postMessage(o, "*")));
}));
const o = Date.now(), e = setInterval((function() {
const i = Date.now() - o;
if ($("video source[src], video[src]").length > 0) {
clearInterval(e), $("video, audio").each((function(n, o) {
const e = o.muted;
o.muted = !0;
const i = Date.now(), t = setInterval((function() {
const n = Date.now() - i;
o.muted = !0, o.pause(), n > 4e3 ? (clearInterval(t), o.muted = e) : o.muted = !0;
}), 60);
}));
const o = $("video source[src]").eq(0).attr("src") || $("video[src]").eq(0).attr("src") || "";
return /^\/[^\/]/.test(o) && (o = location.origin + o), void (isValidVideoUrl(o) ? window.parent.postMessage({
pageInfo: n,
usedTime: i,
_id: MESSAGE_ID,
action: "play.video",
from: location.href,
origin: location.href,
url: o,
parent: !0
}, "*") : window.parent.postMessage({
pageInfo: n,
usedTime: i,
text: "NOT MATCH VIDEO URL",
_id: MESSAGE_ID,
action: "log",
from: location.href,
origin: location.href,
url: o,
parent: !0
}, "*"));
}
const t = $("iframe[src]").length > 0;
if (i >= 4e3 && t) return void clearInterval(e);
const a = $("video").length > 0;
(i >= 1e4 || i >= 2e3 && a) && (clearInterval(e), window.parent.postMessage({
pageInfo: n,
usedTime: i,
hasVideo: a,
hasIframe: t,
_id: MESSAGE_ID,
action: "sniff.fail",
from: location.href,
origin: location.href,
parent: !0
}, "*"));
}), 100);
}
function addonGo() {
BETTER_ADDONS.forEach((function(n) {
Is(n.match) && execQuickAddons(n);
}));
}
const isTop = window.top === window.self, isNotTop = !isTop, _D = !1, OO_SIGN = "(o˘◡˘o)", PLUGIN_ID = "(o˘◡˘o) 觅影", PLUGIN_ATTR = "miying", PLUGIN_NAME = "觅影", VERSION = "20.3.33", isGM = "undefined" !
Back to home |
File page
Subscribe |
Register |
Login
| N