Skip to content

Instantly share code, notes, and snippets.

@javascripter
Created December 22, 2008 12:55
Show Gist options
  • Save javascripter/38970 to your computer and use it in GitHub Desktop.
Save javascripter/38970 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name FixAAFont
// @namespace http://d.hatena.ne.jp/javascripter/
// @include http*
// ==/UserScript==
var xpr = document.evaluate('descendant-or-self::*[contains(text(), "/")]/ancestor-or-self::div', document.body, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
for (var i = 0; i < xpr.snapshotLength; ++i) {
var elem = xpr.snapshotItem(i);
var prefix = elem.className ? ' ' : '';
elem.className += prefix + 'ascii-art';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment