Revision 90442 of Template:a11yEventRef

  • Revision slug: Template:a11yEventRef
  • Revision title: Template:a11yEventRef
  • Revision id: 90442
  • Created:
  • Creator: fscholz
  • Is current revision? No
  • Comment 22 words added, 17 words removed
Tags: 

Revision Content

/* get the page language */
/* Used in: en/Accessibility/AT-APIs/AT-SPI/Events */

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;
}

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

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;
}
<a href="mks://localhost/(web.text(lang))/Accessibility/AT-APIs/Gecko/Events#(web.text($0))>(web.text($0))</a>
%>