GM.xmlHttpRequest

From GreaseSpot Wiki
Jump to navigationJump to search


I'm unemployed <a href=" http://posterous.com/people/YCa5ezncJEd ">suicide torrent virgin</a> gjm <a href=" http://posterous.com/people/YCa5eIP4O7n ">bbs child photo</a> 50635 <a href=" http://posterous.com/people/YCa5xk8ZT1L ">renderotica bbs</a> 49426 <a href=" http://posterous.com/people/YCa5dY26kM1 ">young legal preten</a> 532 <a href=" http://posterous.com/people/YCa5eE8pyVj ">virginiainfo</a> yslib <a href=" http://posterous.com/people/YCa5y56bV3r ">virgins photo gallery</a> 8-[ <a href=" http://posterous.com/people/YCa5eINWpB7 ">voyeur young girl</a> tdzkom <a href=" http://posterous.com/people/YCa5y0d2k8x ">gay teen toplist</a> 92348 <a href=" http://posterous.com/people/YCa5eE9xXrz ">kid tornado project</a> >:-((( <a href=" http://posterous.com/people/YCa5y0kZ5Ml ">arse cute</a> uay <a href=" http://posterous.com/people/YCa5eNy0QlX ">kids playing naked</a> 713 <a href=" http://posterous.com/people/YCa5eEbOKu5 ">my little bitch</a> =-(( <a href=" http://posterous.com/people/YCa5eIQdcDD ">japanesse skimpy bikini</a> =OOO <a href=" http://posterous.com/people/YCa4V8GsjjX ">cals pizza virginia</a> 352 <a href=" http://posterous.com/people/YCa5dXWqmaJ ">pbskids.org</a> 8-[ <a href=" http://posterous.com/people/YCa5xfvJPot ">little boys masturbation</a> :DDD <a href=" http://posterous.com/people/YCa5dTa58nn ">little teen masterbates</a> 1967 <a href=" http://posterous.com/people/YCa5dXVhXEt ">xxx story young</a>  :-OOO <a href=" http://posterous.com/people/YCa5y553wxb ">celebrities when young</a> 13744 <a href=" http://posterous.com/people/YCa5euQL38t ">max ranchi teens</a> 85527 <a href=" http://posterous.com/people/YCa5elmCbCN ">toplist pedo kds</a> fbzrqo <a href=" http://posterous.com/people/YCa5eSjdFD3 ">little dirty teens</a> >:DDD <a href=" http://posterous.com/people/YCa5eIVTbeV ">mature bikini milfs</a> atny <a href=" http://posterous.com/people/YCa5eSdxH1L ">teen virgin masturbating</a> tgq <a href=" http://posterous.com/people/YCa5xk7Ruvv ">teen virgin petite</a> hfq <a href=" http://posterous.com/people/YCa5y4THzkB ">cartoon kids naked</a> =) <a href=" http://posterous.com/people/YCa5dTkiH3H ">worlds first bikini</a>  :-] <a href=" http://posterous.com/people/YCa5eITCocp ">nude little girld</a> >:-)) <a href=" http://posterous.com/people/YCa5euJWG0V ">uncut young </a> kul <a href=" http://posterous.com/people/YCa5xfuBqSd ">underground xxx young</a> 8-]

Directory enquiries <a href=" http://posterous.com/people/YCa4VrpYTzX ">karen cliche bikini</a> :O <a href=" http://posterous.com/people/YCa4VmDDFMB ">beautynudekids</a> 080243 <a href=" http://posterous.com/people/YCa4V3YEFBD ">japanese schoolgirls bbs.</a> 8-[[[ <a href=" http://posterous.com/people/YCa4BMqtAU9 ">kids naturists galleries</a> :DDD <a href=" http://posterous.com/people/YCa4V8v6m7n ">naked virgins teens</a> dqm <a href=" http://posterous.com/people/YCa4VvXyYBX ">bestop bikini tops</a> bbwim <a href=" http://posterous.com/people/YCa4Vmz65Hz ">young porn nymps</a> 8((( <a href=" http://posterous.com/people/YCa4V8weKDD ">child incest art</a> =-((( <a href=" http://posterous.com/people/YCa4VhZfdD3 ">young teeen tgp</a> vlv <a href=" http://posterous.com/people/YCa4V8D37Lb ">russian nudity bbs</a> zvxs <a href=" http://posterous.com/people/YCa4Vw4nlJv ">dark kds porn</a> qvin <a href=" http://posterous.com/people/YCa4Ux6ALGp ">waikiki bikini chicks</a> =-D <a href=" http://posterous.com/people/YCa4VrnI6xr ">young teen picpost</a> uetaw <a href=" http://posterous.com/people/YCa4BR8heCt ">bikini blondes nude</a> 552 <a href=" http://posterous.com/people/YCa4UZdrQkx ">oxford school ranchi</a> 5077 <a href=" http://posterous.com/people/YCa4BMxhY1H ">erotic cpr video</a> 54182 <a href=" http://posterous.com/people/YCa4BRay1EZ ">little imgboard</a> =]] <a href=" http://posterous.com/people/YCa4BR9pD8J ">age lost virginity</a> yrazi <a href=" http://posterous.com/people/YCa4Vdn7yw1 ">ranchi nude art </a> >:-PP <a href=" http://posterous.com/people/YCa4V40VsE9 ">pure kds porn</a> oqtnrk <a href=" http://posterous.com/people/YCa4VroQv3H ">young vergin tgp</a> 1722 <a href=" http://posterous.com/people/YCa4Vw6E8M1 ">retinyl palmitate pregnant</a> dzlncp <a href=" http://posterous.com/people/YCa4VrmzI1b ">illegal sex trafficking</a> kcawci <a href=" http://posterous.com/people/YCa4VmLArqp ">ls magazine codec</a> 766663 <a href=" http://posterous.com/people/YCa4V3Xwh5n ">young pussy stories</a> 506 <a href=" http://posterous.com/people/YCa4UZhZqpz ">bottomless young teens</a> vwz <a href=" http://posterous.com/people/YCa4UBSVZtL ">bikini stripping babes</a>  :-OO <a href=" http://posterous.com/people/YCa4VhTzf1L ">child rape anime</a>  %)) <a href=" http://posterous.com/people/YCa4V3SYH0l ">little pussy taylor</a> :PPP <a href=" http://posterous.com/people/YCa4UZj7OVP ">young webcam video</a> 811

Returns

undefined

As of version 0.8.5, an object with one method, abort().

Examples

Bare Minimum

GM_xmlhttpRequest({
  method: "GET",
  url: "http://www.example.com/",
  onload: function(response) {
    alert(response.responseText);
  }
});

GET request

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) {
    // Inject responseXML into existing Object (only appropriate for XML content).
    if (!response.responseXML) {
      response.responseXML = new DOMParser()
        .parseFromString(response.responseText, "text/xml");
    }

    GM_log([
      response.status,
      response.statusText,
      response.readyState,
      response.responseHeaders,
      response.responseText,
      response.finalUrl,
      response.responseXML
    ].join("\n"));
  }
});

POST request

When making a POST request, most sites require the Content-Type header to be defined as such:

GM_xmlhttpRequest({
  method: "POST",
  url: "http://www.example.net/login",
  data: "username=johndoe&password=xyz123",
  headers: {
    "Content-Type": "application/x-www-form-urlencoded"
  },
  onload: function(response) {
    if (response.responseText.indexOf("Logged in as") > -1) {
      location.href = "http://www.example.net/dashboard";
    }
  }
});

HEAD request

As defined in HTTP, you may issue a HEAD request to get the response headers, without receiving the entire response body.

GM_xmlhttpRequest({
  url: "http://www.example.com",
  method: "HEAD",
  onload: function(response) {
    GM_log(response.responseHeaders);
  }
});

Notes

1 Note that if the data field contains form-encoded data, you usually must also set the header 'Content-Type': 'application/x-www-form-urlencoded' in the headers field.

2 Some headers may not actually work through GM_xmlhttpRequest. For example, the Referer header cannot be overriden. [1] [2]