mozilla

Revision 352815 of Template:expTrevorh3

  • Revision slug: Template:expTrevorh3
  • Revision title: Template:expTrevorh3
  • Revision id: 352815
  • Created:
  • Creator: trevorh
  • Is current revision? No
  • Comment

Revision Content

<% var found, path, width = $1 > 0 ? $1 : 250, height = $2 > 0 ? $2 : 250; env.files.forEach(function (aFile) { %><%-aFile.url%>
<% if(!found && $0 === aFile.filename) { found = true; var p = kuma.url.parse(env.url, true); url = p.protocol + '//' + p.host + aFile.url; %> <%- url %>
<% } }); if (!found) { %>

Unable to find file <%= $0 %>

<% } %>

Revision Source

<%
var found,
    path,
    width  = $1 > 0 ? $1 : 250,
    height = $2 > 0 ? $2 : 250;
  
env.files.forEach(function (aFile) {
    %><%-aFile.url%><br><%
    if(!found && $0 === aFile.filename) {
        found = true;
        var p = kuma.url.parse(env.url, true);
        url = p.protocol + '//' + p.host + aFile.url;
%>
<%- url %><br>
<iframe src='<%- url %>' width="<%- width %>" height="<%- height %>" frameborder="0" sandbox="allow-scripts"></iframe>
<%
    }
});
  
if (!found) {
%><p>Unable to find file <em><%= $0 %></em></p><%
}
%>