MDN may have intermittent access issues April 18 13:00 - April 19 01:00 UTC. See whistlepig.mozilla.org for all notifications.

mozilla

Revision 80101 of Template:Embed text

  • Revision slug: Template:Embed_text
  • Revision title: Template:Embed text
  • Revision id: 80101
  • Created:
  • Creator: SamB
  • Is current revision? No
  • Comment Reverted to earlier version; 2 words added
Tags: 

Revision Content

{{
  var found = false;
  var allFiles = map.values(page.files);
  foreach(var aFile in allFiles) {
    if (string.compare(args[0], aFile.name, true) == 0) {
      found = true;
      if (#args > 1) {
        syntax[args[1]](web.text(aFile.uri));
      } else {
        web.text(aFile.uri);
      }
      break;
    }
  }
  if (found == false) {
    web.html("

Unable to find file '" + args[0] + "'.

"); } }} %>

Revision Source

<pre class="deki-transform" function="syntax.dekiscript">
{{
  var found = false;
  var allFiles = map.values(page.files);
  foreach(var aFile in allFiles) {
    if (string.compare(args[0], aFile.name, true) == 0) {
      found = true;
      if (#args > 1) {
        syntax[args[1]](web.text(aFile.uri));
      } else {
        web.text(aFile.uri);
      }
      break;
    }
  }
  if (found == false) {
    web.html("<p>Unable to find file '" + args[0] + "'.</p>");
  }
}}
%>
Revert to this revision