4chan No XXX

By rossy! Last update Apr 24, 2010 — Installed 1,579 times.

There are 1 previous version of this script.

// ==UserScript==
// @name           4chan No XXX
// @namespace      rossy2401.blogspot.com
// @description    Doubles threads.
// @include        http://boards.4chan.org/*
// ==/UserScript==

var tags = document.getElementsByClassName("quotejs");
for (var tag in tags)
	if (tag = tags[tag], tag.getAttribute("href").indexOf("#q") + 1 || tag.getAttribute("href").substring(0, 16) == "javascript:quote")
		if (tag.textContent.substring(tag.textContent.length - 3) == "XXX")
		{
			tag.removeChild(tag.firstChild);
			tag.appendChild(document.createTextNode(tag.parentNode.getAttribute("id").match(/\d\d*/)));
		}
		else
			break;