Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch mostly fixes problems when minifying the code by making sure needed semicolons exist. It also removes a bunch of unnecessary semicolons and fixes possible problems with parseInt(). I also fixed a problem with the demo page on casesensitive filesystems (like Linux).
For fixing the code I tried to run the code through http://www.jshint.com/ using the following options:
/*jshint latedef:false, forin:true, eqeqeq:false, eqnull:true, noarg:true, noempty:true, bitwise:true, undef:true, browser:true, indent:4, maxerr:150, multistr:true, sub:true, smarttabs:true, white:false */
JSHint still find a whole bunch of problems mostly related to undefined variables. It seems like you're relying on several global variables (like
settings
for example). These should ideally be moved to become class members instead.The patches should be pretty selfcontained, so feel free to cherrypick if you don't like certain things.