Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name So brave
- // @namespace http://userscripts.org/
- // @author Ron Paul
- // @description Downvotes galore.
- // @match http://*.reddit.com/*/comments/*
- // @include http://*.reddit.com/*/comments/*
- // @version 1.0
- // ==/UserScript==
- (function(a, b, c, clickEvent) {
- clickEvent = document.createEvent("MouseEvents");
- clickEvent.initEvent("click", true, true);
- for (var i = 0, len = a.length; i < len; i += 1) {
- b = a[i].querySelector('.usertext');
- if (b.textContent.match(/\so brave\b/i)) {
- if (b.parentNode.parentNode.parentNode.parentNode.querySelector('.arrow.down')) {
- c.push(b.parentNode.parentNode.parentNode.parentNode.querySelector('.arrow.down'));
- };
- }
- }
- function downVote(e){e.dispatchEvent(clickEvent);};
- c.forEach(function(e,i){setTimeout(function(){downVote(e)},i*2000);});
- })
- (a = document.querySelectorAll('.comment'), b = {}, c = [], clickEvent="");
Add Comment
Please, Sign In to add comment