Template:a11yEventRef

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

Revision Content

/* Used in: en/Accessibility/AT-APIs/AT-SPI/Events */

/* 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/Events#' + $0;
$0

%>

Revision Source

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

/* 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/Events#' + $0;
<a href=(href)>$0</a>

%>
Revert to this revision