Last active
August 18, 2024 03:11
-
-
Save markx/6c3b374699dae76a7f8e55f716c649e8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name oledvod mpv | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://www.olevod.com/static/player/plyr3.html | |
// @match https://www.olevod.com/static/player/videojs.html | |
// @grant GM_webRequest | |
// @grant GM_openInTab | |
// ==/UserScript== | |
'use strict'; | |
let found = false; | |
function listener(info, message, details) { | |
console.log("!!!", info, message, details); | |
console.log("@@@", found); | |
// https://europe.olemovienews.com/ts2/20230228/GcHbghlC/mp4/GcHbghlC.mp4/index-v1-a1.m3u8 | |
const url = details.url.replace(/(.*)\/^(?!hls).+?\.m3u8$/, '$1/master.m3u8') | |
if (found) { | |
console.log("!!!!!!!!", "already found", url); | |
return; | |
} | |
found = true | |
console.log("!!!found video: ", url); | |
GM_openInTab(`mpv://${url}`) | |
} | |
GM_webRequest([ | |
{ selector: '*.m3u8', action: { cancel: true } }, | |
], listener); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name pangzi-mpv | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2 | |
// @description Play pangzitv videos with MPV. | |
// @author You | |
// @match https://pangzitv.com/h5-new/2.html | |
// @grant GM_webRequest | |
// @grant GM_notification | |
// @grant GM_setClipboard | |
// @grant GM_openInTab | |
// ==/UserScript== | |
'use strict'; | |
let found = new Set() | |
function listener(info, message, details) { | |
const url = details.url | |
if (found.has(url)) { | |
return; | |
} | |
found.add(details.url) | |
GM_openInTab(`mpv://${url}`) | |
} | |
GM_webRequest([ | |
{ selector: '*pzvcdn.com/*.m3u8', action: {cancel: true} }, | |
], listener); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name xiaobao-mpv | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2 | |
// @description Play xiaobaotv videos with MPV. | |
// @author You | |
// @match https://xiaobaotv.net/player/* | |
// @match https://xiaoxintv.net/player/* | |
// @match https://xiaoxintv.com/player/* | |
// @match https://xbyy.app/player/* | |
// @grant GM_webRequest | |
// @grant GM_notification | |
// @grant GM_setClipboard | |
// @grant GM_openInTab | |
// ==/UserScript== | |
'use strict'; | |
let found = false | |
function listener(info, message, details) { | |
const url = details.url | |
console.log("!!!!!!!!!!!!!!!", url) | |
if (found) { | |
return; | |
} | |
found = true | |
GM_openInTab(`mpv://${encodeURIComponent(url)}`) | |
} | |
GM_webRequest([ | |
{ selector: '*.m3u8', action: {cancel: true} }, | |
], listener); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment