Skip to content

Instantly share code, notes, and snippets.

@arantius
Created August 9, 2011 15:28
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 arantius/1134362 to your computer and use it in GitHub Desktop.
Save arantius/1134362 to your computer and use it in GitHub Desktop.
Sync GM_xhr test
// ==UserScript==
// @name Sync GM_xhr test
// @namespace https://github.com/arantius
// @include http:*
// ==/UserScript==
for (var i = 1; i < 4; i++) {
dump('request ' + i + ' (' + (new Date().toLocaleString()) + ') ... ');
var req = GM_xmlhttpRequest({
method: "GET",
url: "http://localhost/slow.php",
synchronous: true
});
dump(req.status + ' ' + req.statusText +'\n');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment