Created
May 1, 2014 19:26
-
-
Save anonymous/6df09d8a65bb885e7b81 to your computer and use it in GitHub Desktop.
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 Global reddit No Participation | |
// @namespace http://www.doctormckay.com/ | |
// @version 1.0.0 | |
// @description Enforces No Participation on reddit globally, even if the subreddit doesn't support it | |
// @include http://np.reddit.com/* | |
// @match http://np.reddit.com/* | |
// ==/UserScript== | |
(function( ) { | |
// include jQuery | |
var headID = document.getElementsByTagName("head")[0]; | |
var newScript = document.createElement('script'); | |
newScript.type = 'text/javascript'; | |
newScript.id = 'myjQuery'; | |
newScript.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js'; | |
headID.appendChild(newScript); | |
window.addEventListener('load', function (e) { | |
if(window.location.pathname == '/') { | |
window.location.href = 'https://pay.reddit.com'; | |
return; | |
} | |
jQuery('.arrow').css('visibility', 'hidden'); | |
jQuery('.report-button, a[onclick*="return reply(this)"]').parent().remove(); | |
jQuery('.usertext-edit, .sidebox.submit, .commentingAs, .markdownEditor, .subButtons, .helplink, .titlebox .fancy-toggle-button.toggle > .option.add').remove(); | |
document.title = "[NP] " + document.title; | |
}, false); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment