Skip to content

Instantly share code, notes, and snippets.

@najashark
Created March 18, 2019 15:31
Show Gist options
  • Save najashark/e0ffb95b77bae4c4f1e7f599af14b1db to your computer and use it in GitHub Desktop.
Save najashark/e0ffb95b77bae4c4f1e7f599af14b1db to your computer and use it in GitHub Desktop.
tampermonkey script
// ==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