Revision 295551 of Template:Fx minversion section

  • Revision slug: Template:Fx_minversion_section
  • Revision title: Template:Fx minversion section
  • Revision id: 295551
  • Created:
  • Creator: ethertank
  • Is current revision? No
  • Comment
Tags: 

Revision Content

<% // Inserts a banner that the following section covers a certain Firefox version or later; // we actually prefer the new hN_fx_minversion templates now though. // // $0 - Firefox version var lang = env.locale; var articleUrl = "Firefox " + $0 + " for developers"; var IntroducedIn = "Introduced in Firefox " + $0; switch(lang) { case 'de': articleUrl = "Firefox " + $0 + " für Entwickler"; IntroducedIn = "Eingeführt in Firefox " + $0; break; } var fullURL = web.spacesToUnderscores("/" + lang + '/docs/' + articleUrl); var str = ""; if (wiki.pageExists(fullURL)) { str = "" + IntroducedIn + ""; } else { str = IntroducedIn; } %>

<%-str%>

Revision Source

<%
// Inserts a banner that the following section covers a certain Firefox version or later;
// we actually prefer the new hN_fx_minversion templates now though.
//
//  $0 - Firefox version

var lang = env.locale;

var articleUrl = "Firefox " + $0 + " for developers";
var IntroducedIn = "Introduced in Firefox " + $0;

switch(lang) {
    case 'de':
        articleUrl = "Firefox " + $0 + " für Entwickler";
        IntroducedIn = "Eingeführt in Firefox " + $0;
    break;
}

var fullURL = web.spacesToUnderscores("/" + lang + '/docs/' + articleUrl);
var str = "";

if (wiki.pageExists(fullURL)) {
    str = "<a href='" + fullURL + "'>" + IntroducedIn + "</a>";
} else {
    str = IntroducedIn;
}
%>
<div class="standardNote">
  <p><%-str%></p>
</div>