Skip to content

Instantly share code, notes, and snippets.

@LouCypher
Created December 20, 2013 15:20
Show Gist options
  • Save LouCypher/8056233 to your computer and use it in GitHub Desktop.
Save LouCypher/8056233 to your computer and use it in GitHub Desktop.
/* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The Fuck You Want
* To Public License, Version 2, as published by Sam Hocevar. See
* http://www.wtfpl.net/ for more details. */
// ==UserScript==
// @name userstyles.org - stop redirect
// @namespace https://userscripts.org/users/12
// @version 1.0
// @author LouCypher
// @license WTFPL
// @contributionURL http://loucypher.github.io/userscripts/donate.html
// @homepageURL https://github.com/LouCypher/userscripts
// @supportURL https://github.com/LouCypher/userscripts/issues
// @resource LICENSE https://raw.github.com/LouCypher/userscripts/master/licenses/WTFPL/LICENSE.txt
// @include http://userstyles.org/*
// @include http://forum.userstyles.org/*
// @run-at document-start
// @grant none
// ==/UserScript==
window.addEventListener("beforescriptexecute", function(aEvent) {
var script = aEvent.target;
if (!script.src && /bitmonica/.test(script.textContent)) {
window.removeEventListener(aEvent.type, arguments.callee, true);
aEvent.preventDefault();
}
}, true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment