I've found various problems / bugs in the foxypal javascript file. I've also attached a patch that fixes all these problems.
1. Foxypal does not use Drupal Behaviors (see https://drupal.org/node/756722). This will render foxypal incompatible with content rendered via ajax. This has been fixed in the attached patch.
2. Utility functions are in gobal scope. This could cause conflicts with other javascript libraries using functions with the same name. The patch moves all utility functions into a properly namespaced location.
3. A JavaScript closure was not used to define `$`, causing `$` to be undefined in some situations.
4. Missing semicolons, causing javascript minification to break.
5. This ins't a bug, but I was a bit confused by the error I was getting when using an outdated version of jQuery, so I also added an explicit check for the correct jQuery version and throw an alert it is not compatible.
Comment | File | Size | Author |
---|---|---|---|
fixJavascript.patch | 8.46 KB | phayes |
Comments
Comment #1
kilogauss CreditAttribution: kilogauss commentedThanks for submitting this! I'll dig into it this weekend and get a new build created.
Comment #2
phayes CreditAttribution: phayes commentedGreat thanks. Let me know if you have any questions.
Comment #4
kilogauss CreditAttribution: kilogauss commented