Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// ==UserScript==
// @name Abema 强制 1080p
// @version 1.0.0
// @run-at document-start
// @namespace Violentmonkey Scripts
// @match https://abema.tv/*
// @grant none
// ==/UserScript==
const open = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function () {
arguments[1] = arguments[1].replace('720/playlist.m3u8', '1080/playlist.m3u8')
open.apply(this, arguments);
};
@Royal-Change

This comment has been minimized.

Copy link

@Royal-Change Royal-Change commented May 18, 2020

XMLHttpRequest.prototype.open拦截不到playlist.m3u8这个ajax请求,或许是用了fetch接口?

@Last-Order

This comment has been minimized.

Copy link
Owner Author

@Last-Order Last-Order commented May 18, 2020

@Royal-Change Abema已经用Fetch了

@Royal-Change

This comment has been minimized.

Copy link

@Royal-Change Royal-Change commented May 22, 2020

@Royal-Change Abema已经用Fetch了

fetch是不是没有拦截器,是没有办法了吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment