Bug in way USP.CSS is appended to document
![]() ![]() |
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; |
![]() ![]() |
Yes, you are right obviously. Thank you! I already changed it in the new version. |

