// ==UserScript== // @name SGW Improver // @namespace http://greasyfork.org/ // @version 0.3.7 // @description Improves Shopgoodwill // @include *://*.shopgoodwill.tld/* // @copyright 2015+, You // @downloadURL none // ==/UserScript== var replaceArry = [ [/One line (49 characters maximum); no HTML tags, please. Neatness counts. Please don't use all caps, lots of "!!!", etc. We reserve the right to clean up titles we find that do not conform to Policy./gi, ""], [/Note:avoid using asterisks, plus signs, and other special characters (©,®,™,—, etc...)in your item title. Our search may overlook words that contain these characters -- thus making it harder for bidders to find your item./gi, ""], [/ One line (49 characters maximum); no HTML tags, please. Neatness counts. Please don't use all caps, lots of "!!!", etc. We reserve the right to clean up titles we find that do not conform to Policy./gi, ""], ]; var numTerms = replaceArry.length; var txtWalker = document.createTreeWalker ( document.body, NodeFilter.SHOW_TEXT, { acceptNode: function (node) { //-- Skip whitespace-only nodes if (node.nodeValue.trim() ) return NodeFilter.FILTER_ACCEPT; return NodeFilter.FILTER_SKIP; } }, false ); var txtNode = null; while (txtNode = txtWalker.nextNode () ) { var oldTxt = txtNode.nodeValue; for (var J = 0; J < numTerms; J++) { oldTxt = oldTxt.replace (replaceArry[J][0], replaceArry[J][1]); } txtNode.nodeValue = oldTxt; }