Created
March 18, 2019 15:31
-
-
Save najashark/e0ffb95b77bae4c4f1e7f599af14b1db to your computer and use it in GitHub Desktop.
tampermonkey script
This file contains 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 Hijack RARBG PopUps | |
// @namespace https://github.com/Hacksign/configs/blob/master/firefox/plugins/greasemonkey/rarbg.user.js | |
// @version 0.1 | |
// @description Prevent rarbg from popping up annoying ad pages | |
// @author Hacksign | |
// @match https://*.rarbg.to/* | |
// @include https://*.proxyrarbg.org/* | |
// @include https://*.rarbgway.org/* | |
// @include https://*.rarbgunblocked.org/* | |
// @run-at document-start | |
// ==/UserScript== | |
(function() { | |
window.addEventListener( | |
'beforescriptexecute', | |
function(e) { | |
if(e.target.src.match(/\/expla\d+\.js$/)){ | |
e.preventDefault(); | |
e.stopPropagation(); | |
window.removeEventListener(e.type, arguments.callee, true); | |
} | |
}, | |
true | |
); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment