您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Scripting is fun
// ==UserScript== // @name XHR without barriers -- test // @description Scripting is fun // @include * // @grant GM_xmlhttpRequest // @version 0.0.1.20140828150027 // @namespace https://gf.zukizuki.org/users/4813 // ==/UserScript== GM_xmlhttpRequest({ method: "GET", url: "http://www.example.net/", headers: { "User-Agent": "Mozilla/5.0", // If not specified, navigator.userAgent will be used. "Accept": "text/xml" // If not specified, browser defaults will be used. }, onload: function(response) { var responseXML = null; // Inject responseXML into existing Object (only appropriate for XML content). if (!response.responseXML) { responseXML = new DOMParser() .parseFromString(response.responseText, "text/xml"); } console.log([ response.status, response.statusText, response.readyState, response.responseHeaders, response.responseText, response.finalUrl, responseXML ].join("\n")); } });