mozilla

Revision 371989 of Template:B2GOnlyHeader2

  • Revision slug: Template:B2GOnlyHeader2
  • Revision title: Template:B2GOnlyHeader2
  • Revision id: 371989
  • Created:
  • Creator: ethertank
  • 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.' }), privileged: mdn.localString({ "en-US": 'This API is available on Firefox OS for ' + 'privileged or certified applications only.' }), certified : mdn.localString({ "ja": 'この API は 認定済みアプリのみ、 Firefox OS で有効になります。', "en-US": 'This API is available on Firefox OS for ' + 'certified applications only.' }) }; var secLevel = $0 && $0.toLowerCase() || 'certified'; if (!(secLevel in secString)) { secLevel = 'certified'; } %>

<%-secString[secLevel]%>

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="/en-US/docs/Mozilla/Firefox_OS">Firefox OS</a> for ' +
                 '<a href="/en-US/docs/Mozilla/Firefox_OS/Security/Application_security">web content or higher privileged applications</a>.'
    }),
    privileged: mdn.localString({
        "en-US": 'This API is available on <a href="/en-US/docs/Mozilla/Firefox_OS">Firefox OS</a> for ' +
                 '<a href="/en-US/docs/Mozilla/Firefox_OS/Security/Application_security">privileged or certified applications</a> only.'
    }),
    certified : mdn.localString({
        "ja":    'この API は <a href="/ja/docs/Mozilla/Firefox_OS/Security/Application_security">認定済みアプリ</a>のみ、 <a href="/ja/docs/Mozilla/Firefox_OS">Firefox OS</a> で有効になります。',
        "en-US": 'This API is available on <a href="/en-US/docs/Mozilla/Firefox_OS">Firefox OS</a> for ' +
                 '<a href="/en-US/docs/Mozilla/Firefox_OS/Security/Application_security">certified applications</a> only.'
    })
};

var secLevel = $0 && $0.toLowerCase() || 'certified';

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


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