Last active
April 2, 2021 22:44
-
-
Save yokrysty/4e2205c6fd48ef89ff3f9fd6bad4a330 to your computer and use it in GitHub Desktop.
anti anti ad block on ustream.to
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name AntiAntiAdBlockerUStream | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1.1 | |
// @description anti anti ad block on ustream.to | |
// @author krysty | |
// @grant none | |
// @include https://beef1999.blogspot.com/* | |
// @run-at document-start | |
// @updateURL https://gist.github.com/yokrysty/4e2205c6fd48ef89ff3f9fd6bad4a330/raw/cbe2b521e775440c663e425641b486cf5172c457/AntiAntiAdBlockerUStream.user.js | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
window.console = { log: function(){} }; | |
var oOpen = XMLHttpRequest.prototype.open; | |
XMLHttpRequest.prototype.open = function(method, url) { | |
this._url = url; | |
return oOpen.apply(this, arguments); | |
}; | |
var oSend = XMLHttpRequest.prototype.send; | |
XMLHttpRequest.prototype.send = function(data) { | |
var b = this._url.indexOf('https://www.profitabletrustednetwork.com') == 0 || | |
this._url.indexOf('https://www.revenuenetworkcpm.com') == 0; | |
if (!b) { | |
return oSend.apply(this, arguments); | |
} | |
Object.defineProperty(this, "readyState", { | |
get: function() { | |
return XMLHttpRequest.DONE; | |
} | |
}); | |
Object.defineProperty(this, "status", { | |
get: function() { | |
return 200; | |
} | |
}); | |
this.onabort = this.onerror = null; | |
this.abort(); | |
this.onload(); | |
} | |
var oDocumentWrite = document.write; | |
document.write = function(s) { | |
oDocumentWrite.call(this, s); | |
if (window.$) { | |
window.$('.overlay, .popup, #boz_av_bottom').remove(); | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment