Preference window for userscripts

By devnull69 Last update Sep 30, 2009 — Installed 8,459 times.

Bug in way USP.CSS is appended to document

in
Subscribe to Bug in way USP.CSS is appended to document 2 posts, 2 voices



SunKast User
FirefoxWindows

I use this script with another script I wrote for a vBulletin based forum and discovered an annoying bug. When I would reply to a post, there is a button I can press to switch editing modes. For the record, this is part of vBulletin and not my script. By default the reply box just has a textarea, but switch the editing mode changes it into an iframe, which causes the USP.CSS to be appended again. So when I switch the editing back to just the textarea editor, I end up with the USP.CSS code in the textarea.

To fix this I simply had USP.CSS appended to the head of the document rather than the body. Here is the code I used:

document.getElementsByTagName('head')[0].appendChild(theStyle).innerHTML=USP.CSS;

 
devnull69 Script's Author
FirefoxWindows

Yes, you are right obviously. Thank you!

I already changed it in the new version.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel