Skip to content

Instantly share code, notes, and snippets.

@erikvold
Created March 10, 2010 13:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erikvold/327876 to your computer and use it in GitHub Desktop.
Save erikvold/327876 to your computer and use it in GitHub Desktop.
This userscript is meant to be a test for GM issue 1065.
// ==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