您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Get the M3U8 URL for a LiveMe replay
- // ==UserScript==
- // @author Arnold François Lecherche
- // @description Get the M3U8 URL for a LiveMe replay
- // @name LiveMe Replay M3U8 URL
- // @namespace greasyfork.org
- // @version 1.0.0
- // @icon https://www.liveme.com/favicon.ico
- // @include http://liveme.com/live.html?*
- // @include http://*.liveme.com/live.html?*
- // @include https://liveme.com/live.html?*
- // @include https://*.liveme.com/live.html?*
- // @license MIT
- // @grant none
- // @run-at document-end
- // @copyright 2018 Arnold François Lecherche
- // ==/UserScript==
- (function (d, s){
- 'use strict';
- var replay = d.querySelector('a.replay'), title = replay && d.querySelector('h1.crumb'), regexp = /https?:\/\/[^:]+?\.m3u8/;
- function findURL() {
- var matches = regexp.exec(d.documentElement.innerHTML);
- replay.removeEventListener('click', findURL, true);
- if (matches) title.innerHTML += ' | <a href="' + matches[0] + '" style="color: blue;">M3U8 Link</a>';
- else s(findURL, 50);
- }
- if (title) replay.addEventListener('click', findURL, true);
- })(document, setTimeout);