Created
May 12, 2016 20:22
-
-
Save irwynks/a878177a073c7054d4499a20da2d52ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GM_xmlhttpRequest({ | |
method: "GET", | |
url: "https://www.mediawiki.org/wiki/User:Bcoughlan/Login_with_curl?action=render", | |
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"); | |
} | |
GM_log([ | |
response.status, | |
response.statusText, | |
response.readyState, | |
response.responseHeaders, | |
response.responseText, | |
response.finalUrl, | |
responseXML | |
].join("\n")); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment