RuudBurger/CouchPotatoServer — pull request #2592 by Damiya (2013-12-10 00:44:39+00:00)
Title: Add toggle to Dereferer logic 

Per #2499, this is a reworked version of the Dereferer separation patch. Initially I was looking into adding a global option event in templates/index.html (per [Ruud Burger's comment](https://github.com/RuudBurger/CouchPotatoServer/pull/2499#issuecomment-29040152)) but this led to an issue where we couldn't change the behavior of the dereferring plugin after the setting changed. We could have bypassed that by having the Dereferer plugin update App.options in response to the frontend.notify event, but that just felt.. gross.

I think this is the cleanest solution. It's self contained, makes one API call on dom load and then listens for settings changes coming back down.

Moving forward, I'd like to see a way to easily expose settings/toggles to the frontend without needing to do an Api request and an App.on, but that's beyond the scope of this PR and needs a little bit of engineering. I'll give it some thought.