some cleanup #95

wants to merge 9 commits into


None yet

1 participant


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 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.

splitbrain added some commits May 4, 2012
@splitbrain splitbrain var statement was closed too early e82c0f2
@splitbrain splitbrain missing semicolon on assignment e3cba4e
@splitbrain splitbrain escape curly brackets
curly brackets have special meaning in regular expressions and should be
escaped when used as literal strings
@splitbrain splitbrain added missing semicolons 1073f09
@splitbrain splitbrain give radix when using parseInt 05d31ea
@splitbrain splitbrain another missing semicolon f7673f4
@splitbrain splitbrain removed unecessary semicolons
Semicolons are only needed to terminate statements and assignments, they
are not needed for control structures or function bodies (except the
function is defined by assigning a closure, then it's an assignment
@splitbrain splitbrain fixed image references
some image files used uppercase extensions (.JPG) which will not work on
file sensitive filesystems.
@splitbrain splitbrain removed ad code
this caused javascript errors for me
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment