Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// ==UserScript==
// @name Abema 强制 1080p
// @description 把其他清晰度的播放列表强制指向1080p
// @version 1.1.0
// @run-at document-start
// @namespace Violentmonkey Scripts
// @match https://abema.tv/*
// @grant none
// ==/UserScript==
const originalFetch = window.fetch
window.fetch = (...args) => {
const regex = /\/\d+\/playlist\.m3u8/
if (typeof args[0] === 'string' && args[0].match(regex)) {
args[0] = args[0].replace(regex, '/1080/playlist.m3u8')
console.log(args[0])
}
return originalFetch(...args)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment