version.js

Overview

Adds more reliable/specific version reporting.

Availability

 Requires backport.js

Compatible with all versions of Warzone from the early Alpha (master snapshot) releases of 3.1 and above.

Notes

The version global was added in 3.1 Beta 1. Version.js will add the missing global for the earlier Alpha releases.

For all releases, version.js will do the following:

  • Ensure consistent value for the "version" global
  • Add .major, .minor, .maint, .status properties (see table below)
  • Add .date property containing a date object defining the release date (defaults to <today> if not known)
  • Add .native property containing the native JS API value of "version"
Warzone VersionNative version version version.major version.minor version.maint version.statusScript version
Earlier releasesundefinedundefined undefinedundefinedundefined
undefined 0.1
3.1 Alphas
(master snapshots)
undefined"3.1_alpha0"310"alpha"0.1
3.1 Beta 1

 
"3.1_beta1"


"TRUNK"

"3.1_beta1"311"beta"0.1
3.1 Beta 2

 
"3.1_beta2"


"TRUNK"

"3.1_beta2"312"beta"0.1
3.1 Beta 4"3.1""3.1_beta4"314"beta"0.1
Later releases(question)same as native version

based on native version or 99 if ambiguous

based on native version or 99 if ambiguous

based on native version or 99 if ambiguous

string part of native version or "unknown" if ambiguous 0.1

Script

  File Modified

JavaScript File version_0.1.js

Mar 08, 2012 by Aubergine

JavaScript File version_0.2.js

Mar 13, 2012 by Aubergine

See also

  • version – documentation for the global