Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Reddit - Only show comment score post vote
- // @namespace gavin19
- // @description Comment scores hidden by default. Votes show after voting.
- // @match http://*.reddit.com/*/*/comments/*
- // @include http://*.reddit.com/*/*/comments/*
- // @version 1.0
- // ==/UserScript==
- var commentDisplay = {
- hideScore: function(x) {
- for(var i=0,lenx=x.length;i<lenx;i++){
- if(x[i]){
- x[i].style.display="none";
- }
- }
- },
- init: function() {
- document.body.addEventListener('DOMNodeInserted', function(ev) {
- if ((event.target.tagName == 'DIV') && (/even/ig.test(event.target.getAttribute('class')))) {
- var x = ev.target.querySelectorAll('.score');
- commentDisplay.hideScore(x);
- }
- }, false);
- var x = document.querySelectorAll('.commentarea:not(.side) .score.unvoted');
- this.hideScore(x);
- }
- }
- commentDisplay.init();
Add Comment
Please, Sign In to add comment