您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Print content-type 'application/vnd.apple.mpegurl'
// ==UserScript== // @name Print requests with content-type 'application/vnd.apple.mpegurl' // @namespace http://your-domain-here/ // @version 12 // @description Print content-type 'application/vnd.apple.mpegurl' // @match http://*/* // @match https://*/* // @grant GM_xmlhttpRequest // @license MIT // ==/UserScript== (function() { 'use strict'; const xhrProto = XMLHttpRequest.prototype; const origOpen = xhrProto.open; const origSend = xhrProto.send; xhrProto.open = function(method, url) { this.addEventListener('load', function() { console.log('Response headers:', this.getAllResponseHeaders()); }); origOpen.apply(this, arguments); }; xhrProto.send = function() { origSend.apply(this, arguments); }; // Add an event listener to wait for the page to load window.onload = function() { // Get all <video> tags on the page var videoTags = document.getElementsByTagName('video'); // Loop through each <video> tag and log its source URL for (var i = 0; i < videoTags.length; i++) { console.log('Video source URL:', videoTags[i].src); } }; })();