Template:B2GOnlyHeader2

  • Revision slug: Template:B2GOnlyHeader2
  • Revision title: Template:B2GOnlyHeader2
  • Revision id: 364937
  • Created:
  • Creator: Jeremie
  • Is current revision? No
  • Comment

Revision Content

<% /* one parameter: Level of security allow to the API: "web", "privileged" or "certified" */ var lang = env.locale; var secString = { web : mdn.localString({ "en-US": ['This API is available on Firefox or Firefox OS for ', 'web content or higher privileged applications','.'].join('') }), privileged: mdn.localString({ "en-US": ['This API is available on Firefox OS for ', 'privileged or certified applications',' only.'].join('') }), certified : mdn.localString({ "en-US": ['This API is available on Firefox OS for ', 'certified applications','only.'].join('') }) }; var secLevel = $0 && $0.toLowerCase() || 'certified'; if (!(secLevel in secString)) { secLevel = 'certified'; } var msgString = mdn.localString({ "en-US": }) %>

<%=msgString%>

Revision Source

<%
/* one parameter: Level of security allow to the API: "web", "privileged" or "certified" */

var lang = env.locale;
var secString = {
    web : mdn.localString({
        "en-US": ['This API is available on Firefox or <a href="/', lang, 
                  '/docs/Mozilla/Firefox_OS" title="/', lang, 
                  '/docs/Mozilla/Firefox_OS">Firefox OS</a> for <a href="/', lang, 
                  '/docs/Mozilla/Firefox_OS/Security/Application_security" title="/', lang, 
                  '/docs/Mozilla/Firefox_OS/Security/Application_security">',
                  'web content or higher privileged applications','</a>.'].join('')
    }),
    privileged: mdn.localString({
        "en-US": ['This API is available on <a href="/', lang, 
                  '/docs/Mozilla/Firefox_OS" title="/', lang, 
                  '/docs/Mozilla/Firefox_OS">Firefox OS</a> for <a href="/', lang, 
                  '/docs/Mozilla/Firefox_OS/Security/Application_security" title="/', lang, 
                  '/docs/Mozilla/Firefox_OS/Security/Application_security">',
                  'privileged or certified applications','</a> only.'].join('')
    }),
    certified : mdn.localString({
        "en-US": ['This API is available on <a href="/', lang, 
                  '/docs/Mozilla/Firefox_OS" title="/', lang, 
                  '/docs/Mozilla/Firefox_OS">Firefox OS</a> for <a href="/', lang, 
                  '/docs/Mozilla/Firefox_OS/Security/Application_security" title="/', lang, 
                  '/docs/Mozilla/Firefox_OS/Security/Application_security">',
                  'certified applications','</a>only.'].join('')
    })
};
var secLevel = $0 && $0.toLowerCase() || 'certified';

if (!(secLevel in secString)) { secLevel = 'certified'; }

var msgString = mdn.localString({
        "en-US": 
    })

%>
<div class="warning">
    <p style="text-align:center"><%=msgString%></p>
</div>
Revert to this revision