您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Auto-clicks "Copy stream link", grabs clipboard, saves .m3u
当前为
// ==UserScript== // @name Export Stream Link to .m3u from Context Menu // @namespace http://tampermonkey.net/ // @version 1.1 // @description Auto-clicks "Copy stream link", grabs clipboard, saves .m3u // @author heapsofjoy // @match https://web.stremio.com/* // @grant clipboardRead // ==/UserScript== (function () { 'use strict'; // Keep track of right-click events document.addEventListener('contextmenu', (e) => { // Slight delay to let context menu render setTimeout(() => { const copyButton = [...document.querySelectorAll('div[title="Copy stream link"]')] .find(el => el?.innerText?.toLowerCase().includes('copy stream link')); if (!copyButton) { console.warn('No "Copy stream link" button found'); return; } // Simulate click copyButton.click(); // Try reading from clipboard shortly after click setTimeout(async () => { try { const text = await navigator.clipboard.readText(); if (!text.startsWith('http')) { alert('❌ Invalid stream URL in clipboard'); return; } const m3u = `#EXTM3U\n${text}`; const blob = new Blob([m3u], { type: 'audio/x-mpegurl' }); const a = document.createElement('a'); a.href = URL.createObjectURL(blob); a.download = 'stream.m3u'; a.click(); URL.revokeObjectURL(a.href); console.log('✅ Stream link saved as .m3u:', text); } catch (err) { alert('❌ Failed to access clipboard. Permissions may be blocked.\n' + err); } }, 500); // allow clipboard to update }, 150); // allow menu to appear }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址