reed / turbolinks-compatibility

A collection of tutorials for how to get your favorite javascript libraries, plugins, and snippets working with Turbolinks.
reed.github.io/turbolinks-compatibility
MIT License
147 stars 35 forks source link

Fix CoffeeScript code for Facebook #56

Closed manuelmeurer closed 9 years ago

manuelmeurer commented 9 years ago

The current solution doesn't work for me. The main problem is that in saveFacebookRoot $('#fb-root').detach() is called even if #fb-root' did not (yet) exist, and in restoreFacebookRoot #fb-root is replaced with fb_root even if fb_root is empty. I added conditions to both functions for this. I also fixed the variable names from snake_case to camelCase. Also, I removed the channelUrl param, which is deprecated, and fixed the SDK load path from all.js to sdk.js

reed commented 9 years ago

Thanks for submitting. I merged this via the command line, so I'm not sure why it's not showing as merged. I guess I'll just have to close this manually.

manuelmeurer commented 9 years ago

:+1: