Reddit forget comment points

By lazyttrick Last update Jun 4, 2009 — Installed 155 times. Daily Installs: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0

There are 4 previous versions of this script.

// ==UserScript==
// @name           Reddit forget comment points
// @namespace      Reddit forget comment points
// @description    Hide comment points and arrows on Reddit. For better experience remove comments score limit in reddit.com/prefs.
// @include        http://*reddit.com/*comments*
// @include        http://*reddit.com/user/*
// ==/UserScript==

// hide comment points .
xpathArray('//span[contains(@class,"score")]').forEach(function(s){
	if(s.getAttribute('class').search(/^score(\s\S+)?/) > -1)
		s.innerHTML = '';
});

// hide comment arrows.
xpathArray('//div[starts-with(@class,"midcol")]').forEach(function(d){
	if(!d.textContent.match(/\d+/))
		d.innerHTML = '';
});


function xpathArray(p, context) {
  if (!context) 
	context = document;
  var i, arr = [], xpr = xpath(p, context);
  for (i = 0; item = xpr.snapshotItem(i); i++) 
	arr.push(item);
  return arr;
}

function xpath(p, context) {
  if (!context) 
	context = document;
  return document.evaluate(p, context, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
}