Template:expTrevorh3

  • Revision slug: Template:expTrevorh3
  • Revision title: Template:expTrevorh3
  • Revision id: 379651
  • Created:
  • Creator: trevorh
  • Is current revision? No
  • Comment

Revision Content

    <% /* * $0 max version to list * */ var maxVersion = $0; var minVersion = maxVersion - 30; if (minVersion < 4) { minVersion = 4 } // old versions var ov = ["3.6", "3.5", "3", "2", "1.5"]; var i; var loc = env.locale; // Use %0 to indicate where the Firefox version number should be var pageTitle = mdn.localString({ "en-US" : "Firefox %0 for developers", "ca" : "Firefox %0 per a desenvolupadors", "de" : "Firefox %0 für Entwickler", "es" : "Firefox %0 para Desarrolladores", "fr" : "Firefox %0 pour les développeurs", "it" : "Firefox %0 per Sviluppatori", "ja": "Firefox %0 for developers", "ko": "Firefox %0 for developers", "nl" : "Firefox %0 voor ontwikkelaars", "pl" : "Firefox %0 dla programistów", "pt-PT" : "Firefox %0 para Desenvolvedores", "ru" : "Firefox %0 для разработчика", "zh-CN" : "Firefox %0 for developers", "zh-TW" : "Firefox %0 技術文件" }); // for newer version for (var i = maxVersion; i >= minVersion; i--) { listItem(i); } // for older version if (minVersion == 4) { for(i = 0; i < ov.length; i++) { listItem(ov[i]); } } function listItem(ver) { %>
  • <%-pageTitle.replace("%0", ver)%>
  • <%} %>

Revision Source

<div class="multiColumnList">
<ul>
<%
/*
 * $0 max version to list
 *
 */
  
var maxVersion = $0;
var minVersion = maxVersion - 30;
if (minVersion < 4) { minVersion = 4 }

// old versions
var ov = ["3.6", "3.5", "3", "2", "1.5"];

var i;
var loc = env.locale;
// Use %0 to indicate where the Firefox version number should be
var pageTitle = mdn.localString({
    "en-US" : "Firefox %0 for developers",
    "ca" : "Firefox %0 per a desenvolupadors",
    "de" : "Firefox %0 für Entwickler",
    "es" : "Firefox %0 para Desarrolladores",
    "fr" : "Firefox %0 pour les développeurs",
    "it" : "Firefox %0 per Sviluppatori",
    "ja": "Firefox %0 for developers",
    "ko": "Firefox %0 for developers",
    "nl" : "Firefox %0 voor ontwikkelaars",
    "pl" : "Firefox %0 dla programistów",
    "pt-PT" : "Firefox %0 para Desenvolvedores",
    "ru" : "Firefox %0 для разработчика",
    "zh-CN" : "Firefox %0 for developers",
    "zh-TW" : "Firefox %0 技術文件"
});

// for newer version
for (var i = maxVersion; i >= minVersion; i--) {
    listItem(i);
}

// for older version
if (minVersion == 4) {
for(i = 0; i < ov.length; i++) {
    listItem(ov[i]);
}
}

function listItem(ver) { %>
    <li><a href="/<%-loc%>/docs/Mozilla/Firefox/Releases/<%-ver%>" title="/<%-loc%>/docs/Mozilla/Firefox/Releases/<%-ver%>"><%-pageTitle.replace("%0", ver)%></a></li>
<%}
%></ul>
</div>
Revert to this revision