A few selected html transformations:
Simple subsitution of contents:
{{{
#!js
t = t.replace(/documentation/, "pure void");
}}}
A convenience method is provided for this, so the above code can be reduced to:
{{{
#!js
replace(/documentation/, "pure void");
}}}
Some sites don't provide a desciptive
but uses the company name for all pages. This can be fixed by extracting a resonable name from the html body and updating the using the convenience function {{{gb.setDocumentTitle()}}}:
{{{
#!js
var m = t.match(/(.+?)<\/span><\/h1>/i);
if (m)
gb.setDocumentTitle(m[1]);
}}}
Some sites works best without Javascript at all because they do awful things like using Flashâ„¢ where a simple
would suffice. A simple convenience function fixes this:
{{{
#!js
gb.zapScriptElements();
}}}