Skip to content

Instantly share code, notes, and snippets.

@Last-Order
Created December 16, 2018 05:13
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Last-Order/43199b7a701fc94e800c2de0ed021f1c to your computer and use it in GitHub Desktop.
Save Last-Order/43199b7a701fc94e800c2de0ed021f1c to your computer and use it in GitHub Desktop.
// ==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
Copy link

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

@Last-Order
Copy link
Author

@Royal-Change Abema已经用Fetch了

@Royal-Change
Copy link

@Royal-Change Abema已经用Fetch了

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

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