I have a problem that seems pretty specific to my plugin but I don't know enough about backbone.js to solve.
Pretext: My plugin injects some DOM elements to control its features and script elements to interface with the page and send events to my plugin's backend.
The Problem: Backbone does some sort of cleaning of the page and removes all of my elements but leaves the original page alone. I know this is backbone because I traced the remove event to part of backbones script. I also know its not plug.dj because they have no reference in their code to anything that could detect my elements. I need to know how to prevent backbone.js from removing my elements or find a way to detect when backbone is done culling the page so I can inject at that time.
If anyone knows of a flag I can put on the elements to prevent this from happening or some sort of flag that tells me backbone is finished, it would be greatly appreciated.
My plugins code is available here: https://github.com/tyduptyler13/PlugPlus/tree/dev (Keep in mind its the dev branch! Master branch is the last stable version, the dev has some new beta features I was testing.)
This code is the most up to date version available to the public and all versions have this issue after plug.dj made the change to backbone.js.
For plug.dj code you will need to dig manually on their site http://plug.dj/
And finally, to test their site with my code you will need to add it from the chrome store.