// ==UserScript== // @name 火星影视视频聚合站增强 // @namespace https://workbuddy.ai // @version 1.1.0 // @description 火星影视视频聚合站增强:自动选最优线路、跳过提示、批量解析、观看历史与收藏;线路失败自动切换(基于真实播放事件探测,而非文案启发式)(Tampermonkey) // @author WorkBuddy // @match *://*/*/mov/* // @match *://*/mov/* // @grant GM_setValue // @grant GM_getValue // @grant GM_addStyle // @grant GM_openInTab // @run-at document-start // @license MIT // ==/UserScript== (function () { 'use strict'; const LOG = (...a) => { try { console.log('[火星影视增强]', ...a); } catch (e) {} }; /* ===================================================================== * 双上下文架构 * - box 上下文(/mov/play/box/):同源页面,内部的 iframe 指向第三方解析播放器 * (跨域)。在此监听该跨域 iframe 的真实 load / error 事件,回传父页面。 * - play 上下文(/mov/play/ 主播放页):接收 box 回传的真实信号, * 据此判断「真的在播 / 硬失败 / 卡死」并自动切换线路。 * 说明:跨域 iframe 的内容(