Skip to content

Instantly share code, notes, and snippets.

Created May 1, 2014 19:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/6df09d8a65bb885e7b81 to your computer and use it in GitHub Desktop.
Save anonymous/6df09d8a65bb885e7b81 to your computer and use it in GitHub Desktop.
// ==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