[Greasemonkey] Stripping font tags

Jeremy Dunck jdunck at gmail.com
Thu Dec 1 10:22:43 EST 2005


On 11/30/05, Randy Burke <uncle.ranny at gmail.com> wrote:
> I have an internal work page that i want to skin, the big problem that I am
> having is that it was  wrote with a bad mix of CSS and font tags.
>
> I was just wondering if there is a easy way to strip all the font tags out
> of the page

Transmute fonts to spans.  :)

Something like:

fonts = document.getElementsByTagName('font');

for each font
  var span = document.createElement('span');
  span.innerHTML = font.innerHTML;
  font.parentNode.replaceChild(span,font);


More information about the Greasemonkey mailing list