Skip to content

Instantly share code, notes, and snippets.

View satakagi's full-sized avatar

Satoru Takagi satakagi

  • KDDI
  • Tokyo Japan
View GitHub Profile
@mallendeo
mallendeo / ajaxOverride.js
Created October 9, 2015 03:48
Override XMLHttpRequest
(function(send) {
XMLHttpRequest.prototype.send = function () {
var callback = this.onreadystatechange
this.onreadystatechange = function() {
if (this.readyState == 4) {
var responseURL = this.responseURL
if (responseURL.match(/https?:\/\/www\.youtube\.com\/watch\?v=.*/g)) {
console.log(responseURL)
}
}