Template:CompatGeckoFxOS

<%

// $0 : version of Gecko
// $1 : version of FxOS if uplifted

var fxOSVer = '1.0'; // Default value
var geckoVer = $0;

// Specific to 1.1: it must have been uplifted. Both 1.0 and 1.1 are based on
//                  Gecko 18.

switch(geckoVer)
{
  case '19':
  case '19.0':
  case '20':
  case '20.0':
  case '21':
  case '21.0':
  case '22':
  case '22.0':
  case '23':
  case '23.0':
  case '24':
  case '24.0':
  case '25':
  case '25.0':
  case '26':
  case '26.0':
    fxOSVer = '1.2';
    break;
  case '27':
  case '27.0':
  case '28':
  case '28.0':
    fxOSVer = '1.3';
    break;
  case '29':
  case '29.0':
  case '30':
  case '30.0':
    fxOSVer = '1.4';
    break;
}
if($1) {
    // We the first parameter override the value (for uplifiting!)  
    fxOSVer = $1;
}

fxOSVer = fxOSVer + " (" + geckoVer + ")";
%>
<%= fxOSVer %>
Search for pages that use Template:CompatGeckoFxOS to see example use cases and how many pages use this macro.

Document Tags and Contributors

Contributors to this page: teoli
Last updated by: teoli,