legacy upload.js: Clean up and remove from jshintignore
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 2 Aug 2013 02:03:11 +0000 (04:03 +0200)
committerTimo Tijhof <krinklemail@gmail.com>
Wed, 18 Sep 2013 16:26:18 +0000 (18:26 +0200)
commit26974db1aa90b565de2c1860c25d61adb00ad5a1
treefae3eefc6d5c53e405ea20a1fdf89a3b0b43932d
parent4ae77e4722f2f2ef5446b3dc470046190ba4d4e5
legacy upload.js: Clean up and remove from jshintignore

* Coding style:
  - Braces
  - Single quotes
  - Dot instead of bracket access for properties
* Fixed various implied global/static variables, most significantly
  the for-loop variable 'cached' etc.
* Changed == '' to ! since === '' will require it to be a string
  and == '' returns true for almost anything that is falsy, no
  good way to choose a strict alternative.
* Changed setAttribute('disabled', ..) to using .property instead.
* Using setTimeout as a global instead of as a window property.
* Using other globals from wikibits.js through window property,
  as they are defined.
* Use a closure instead of string eval() in setTimeout().
* Made local equivalents for some global variables for access
  inside the closure.
* Don't create functions in a loop. Moved the onchange function
  outside the loop and re-used it for each one (safe in this case,
  and more efficient).
* Call setTimeout/clearTimeout as global, no need for the window
  object as host.

Change-Id: I9df912ee48d30c189394bf07f5e49014220f36a3
.jshintignore
skins/common/upload.js