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 Version | Native version | version | version.major | version.minor | version.maint | version.status | Script version |
---|---|---|---|---|---|---|---|
Earlier releases | undefined | undefined | undefined | undefined | undefined | undefined | 0.1 |
3.1 Alphas (master snapshots) | undefined | "3.1_alpha0" | 3 | 1 | 0 | "alpha" | 0.1 |
3.1 Beta 1 |
| "3.1_beta1" | 3 | 1 | 1 | "beta" | 0.1 |
3.1 Beta 2 |
| "3.1_beta2" | 3 | 1 | 2 | "beta" | 0.1 |
3.1 Beta 4 | "3.1" | "3.1_beta4" | 3 | 1 | 4 | "beta" | 0.1 |
Later releases | 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
See also
- version – documentation for the global