Template:a11yRoleRef

  • Revision slug: Template:a11yRoleRef
  • Revision title: Template:a11yRoleRef
  • Revision id: 115101
  • Created:
  • Creator: fscholz
  • Is current revision? No
  • Comment simplifications; 2 words added, 4 words removed

Revision Content

/* Used in: en/Accessibility/AT-APIs/Gecko/Roles */

/* get the page language */
var u = uri.parts(Page.uri);
var lang = string.tolower(u.path[0]);
if (string.contains(lang, "project") || string.contains(lang, "Project")) {
  lang = string.substr(lang, 8);
}
/* fall back to page.language on a user page */
else if (string.StartsWith(lang, "user:")) {
 lang = page.language;
}
var href = 'https://developer.mozilla.org/' + lang + '/Accessibility/AT-APIs/Gecko/Roles/' + $0;

$0
%>

Revision Source

<pre class="script">
/* Used in: en/Accessibility/AT-APIs/Gecko/Roles */

/* get the page language */
var u = uri.parts(Page.uri);
var lang = string.tolower(u.path[0]);
if (string.contains(lang, "project") || string.contains(lang, "Project")) {
  lang = string.substr(lang, 8);
}
/* fall back to page.language on a user page */
else if (string.StartsWith(lang, "user:")) {
 lang = page.language;
}
var href = 'https://developer.mozilla.org/' + lang + '/Accessibility/AT-APIs/Gecko/Roles/' + $0;

<a href=(href)>$0</a>
%>
Revert to this revision