User:PerfektesChaos/js

From MediaWiki.org
Jump to navigation Jump to search

This is a collection of JavaScript code and adjacent pages which might be disseminated over WMF one day.

Scripts:

Similar collections:


Minification[edit]

Since user scripts other than common.js and skin related are not minified I am used to deliver code in two versions:

  1. debug.js or d.js etc., human readable, upstream version to be edited
  2. release.js or r.js etc.
    • corresponding to a distinct version of the first one
    • tested as far as possible, without any known bug
    • comments and whitespace removed in general
    • line break for each statement left to keep decipherable and provide meaningful line numbers in messages
    • important comments left, e.g. revision timestamp
    • string literals concatenated by preprocessing which enables deliberate line breaks in long strings to maintain readability