uniphil/dom-destroyer — pull request #1 by mystor (2014-02-26 16:54:10+00:00)
Title: improve plugin sanitation

Made the plugin clean up after itself better, and ensured that multiple instances of the plugin are not running on a single page at the same time. Also made pressing the button a second time stop the dom-destroyer.

I'm pretty sure that the `__global_dom_destroyer_stop` property doesn't need to have such a long name, as the plugin runs in a separate javascript environment from the rest of the page, only sharing the DOM, but I am not 100% confident, and this works.

I could have made future launches of the plugin use the same handler functions etc. as past launches, however, it would be mildly more difficult, and they will be garbage collected in the current situation anyway.