Whenever a PAGE loads >> as in, any page on the entire board. Even those that doesn't have spoilers.
It isn't a very good solution. The problem lies in that I can't search the page for
Spoiler
tags before the whole page is loaded done. Since we have so many ads and banners and shit, the page usually isn't done until 2-3 seconds.
Thus, when the page finally is done, it flickers slightly when the code runs. In my tests when I made the code, it ran perfectly, but that was because the page used like, 0.2 seconds to load, and therefore the flicker seemed more like part of the page loading.
I'm thinking of methods to limiting the flicker to the post that the spoiler is in though, but I'm not sure if it is possible. Time will tell.