fixing my bugfix.

event listeners still follow better optional attachment pattern, but now
handlers are rescanned on each visibility change so that people's option
changes are immediately reflected.  Without this they would have to
reload any open tabs after changing their options.