Created
March 10, 2010 13:46
-
-
Save erikvold/327876 to your computer and use it in GitHub Desktop.
This userscript is meant to be a test for GM issue 1065.
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
// ==UserScript== | |
// @name GM issue 1065 test | |
// @namespace gmTest | |
// @include * | |
// @match * | |
// @datecreated 2010-03-10 | |
// @lastupdated 2010-03-10 | |
// @version 0.1 | |
// @author Erik Vergobbi Vold | |
// @license GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html | |
// @description This userscript is meant to be a test for GM issue 1065 | |
// ==/UserScript== | |
Object.prototype.AnyNameHere = function(x) {}; | |
Object.prototype.foo = "foo\nbar"; | |
GM_xmlhttpRequest({ | |
method: "GET", | |
url: "http://www.google.com/", | |
headers: { | |
'User-agent': 'Mozilla/4.0 (compatible) Greasemonkey', | |
'Accept': 'application/atom+xml,application/xml,text/xml', | |
}, | |
onload: function(responseDetails) { | |
alert('Request returned ' + responseDetails.status + | |
' ' + responseDetails.statusText + '\n\n' + | |
'Data:\n' + responseDetails.responseText); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment