Template:MozillaOnly

  • Revision slug: Template:MozillaOnly
  • Revision title: Template:MozillaOnly
  • Revision id: 437177
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment

Revision Content

<% // Presents a banner marking a page as covering a topic specific to Mozilla. Intended // for use on API pages in particular, where the API is intentionally designed for // Mozilla products. // // Parameters: // // $0 Explanatory text (optional) // $1 Product name (optional) // var mozillaOnly; var message; var product = $1 || "Mozilla"; var lang = env.locale; switch(lang) { default: mozillaOnly = product + "-specific API"; message = $0 || "This API is only available in Gecko-based software, including Firefox and Firefox OS."; break; } %>
<%-mozillaOnly%>
<%-message%>

Revision Source

<%
// Presents a banner marking a page as covering a topic specific to Mozilla. Intended
// for use on API pages in particular, where the API is intentionally designed for
// Mozilla products.
//
// Parameters:
//
//  $0  Explanatory text (optional)
//  $1  Product name (optional)
//

var mozillaOnly;
var message;
var product = $1 || "Mozilla";

var lang = env.locale;

switch(lang) {
    default:
        mozillaOnly = product + "-specific API";
        message = $0 || "This API is only available in Gecko-based software, including Firefox and Firefox OS.";
        break;
}
%>
<div>
<div class="mozOnlyBanner">
    <dl>
        <dt><%-mozillaOnly%></dt>
        <dd><%-message%></dd>
    </dl>
</div>
</div>
Revert to this revision