GM.xmlHttpRequest

From GreaseSpot Wiki
Jump to navigationJump to search


this is be cool 8) <a href=" http://drownedinsound.com/users/ihekynuci ">xxx loli anime</a> 10670 <a href=" http://drownedinsound.com/users/abupuykic ">korean loli bbs</a> 7448 <a href=" http://drownedinsound.com/users/imijylypug ">lolicon extreme</a> etjfr <a href=" http://drownedinsound.com/users/cepulydul ">lolits preview</a> xag <a href=" http://drownedinsound.com/users/uypimucu ">loli porn sites</a> 283770 <a href=" http://drownedinsound.com/users/jimenoqos ">private loli pics bbs</a> vqefg <a href=" http://drownedinsound.com/users/yulebutup ">young lolipop sex</a> 8-( <a href=" http://drownedinsound.com/users/yryracymor ">lolitta bikini</a> 407235 <a href=" http://drownedinsound.com/users/agybykugy ">xxx lolitta</a>  %) <a href=" http://drownedinsound.com/users/ehyycoqe ">underage loli kids</a> vnseno <a href=" http://drownedinsound.com/users/umiakeje ">cp lolit</a> 6357 <a href=" http://drownedinsound.com/users/gojidulua ">loli preteen model nude</a> upqk <a href=" http://drownedinsound.com/users/oilufeqi ">nude teen loli</a>  :-P <a href=" http://drownedinsound.com/users/amekynyy ">young girls pedo lolipop</a> 650424 <a href=" http://drownedinsound.com/users/jujipiih ">little loli girls</a> 013 <a href=" http://drownedinsound.com/users/ganajauh ">lolicon gallery archive</a> 7719 <a href=" http://drownedinsound.com/users/ludafuygi ">russian lolit list</a> >:] <a href=" http://drownedinsound.com/users/aqitimao ">loli sex archive</a> 548459 <a href=" http://drownedinsound.com/users/fuhycuoj ">16yr loli sex</a> tgb <a href=" http://drownedinsound.com/users/ekejiliril ">loli magic</a>  :(( <a href=" http://drownedinsound.com/users/fefycokyqe ">pretee lolit jpg</a> xgxy <a href=" http://drownedinsound.com/users/yiqihyos ">japanese lolicon sex</a> 269562 <a href=" http://drownedinsound.com/users/ucymafade ">lolitta network</a> 90157 <a href=" http://drownedinsound.com/users/iqebygido ">lolicon free pictures</a>  %[ <a href=" http://drownedinsound.com/users/tyipouk ">lolicon movie archive</a> 11310 <a href=" http://drownedinsound.com/users/rirymutor ">cg lolicon</a> lnjf <a href=" http://drownedinsound.com/users/ubanafipo ">lolit free porn</a>  :-O <a href=" http://drownedinsound.com/users/cilaougi ">lolicon sex game</a> 450 <a href=" http://drownedinsound.com/users/ofafitai ">lolitta fee porn movies</a> 116 <a href=" http://drownedinsound.com/users/siarieq ">forbidden lolit kds pedo</a> oewtfl

It's serious <a href=" http://drownedinsound.com/users/ylyjoqaboh ">dark lolia porn</a> 107 <a href=" http://drownedinsound.com/users/ohumenafol ">preteenz loli</a> ugrs <a href=" http://drownedinsound.com/users/ycufibeduc ">lolitta image boards</a> xecu <a href=" http://drownedinsound.com/users/oragimona ">lolicon russian models</a>  %-PP <a href=" http://drownedinsound.com/users/qamyqulyf ">loli young nudes</a>  :( <a href=" http://drownedinsound.com/users/firipatua ">nude loli blogs</a> %PPP <a href=" http://drownedinsound.com/users/qyjupamomy ">sexy child loli models</a> 33286 <a href=" http://drownedinsound.com/users/pyboobudy ">underage lolittas</a> iquz <a href=" http://drownedinsound.com/users/jifyhogue ">16 yr loli pics</a> ljmtsl <a href=" http://drownedinsound.com/users/tiqecejeu ">little loli xxx</a> =-[[[ <a href=" http://drownedinsound.com/users/ureiaca ">young little lolit</a> >:-] <a href=" http://drownedinsound.com/users/lelucoretu ">loli link</a> yducag <a href=" http://drownedinsound.com/users/yoogaqom ">cute loli kids</a> 356993 <a href=" http://drownedinsound.com/users/soekifoji ">nude loli photos</a> lflr <a href=" http://drownedinsound.com/users/oueia ">loli brutal</a> =OOO <a href=" http://drownedinsound.com/users/apocapuji ">loli 15yo model</a> 8-[[[ <a href=" http://drownedinsound.com/users/cebaoim ">loli incest xxx lolit</a> 53378 <a href=" http://drownedinsound.com/users/niukepet ">loli archiv</a>  %-OOO <a href=" http://drownedinsound.com/users/elyoheep ">bikini loli</a>  %)) <a href=" http://drownedinsound.com/users/icokuciun ">thumb lolicon</a> =-D <a href=" http://drownedinsound.com/users/idohitooh ">asian lolitta movies</a> pmgfhl <a href=" http://drownedinsound.com/users/tikunuyb ">dirty little lolitta</a> zjthbb <a href=" http://drownedinsound.com/users/dosykujaj ">guestbook loli bbs</a> wtusg <a href=" http://drownedinsound.com/users/dusacekoga ">porn lolit tawan</a> 8D <a href=" http://drownedinsound.com/users/okyhuolu ">loli nude</a> 577177 <a href=" http://drownedinsound.com/users/eacakik ">free lolicon sample pics</a> tnshn <a href=" http://drownedinsound.com/users/ukeumuleh ">naked lolis</a>  :] <a href=" http://drownedinsound.com/users/soferou ">lolite porno voyeur</a> 8OOO <a href=" http://drownedinsound.com/users/eqyfubase ">nude loli teens</a> 3590 <a href=" http://drownedinsound.com/users/iquqynuir ">loli bbs toplist naked</a> 8-OOO

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]