download.handlebars 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <!DOCTYPE html>
  2. <html lang="en" dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv=X-UA-Compatible content="IE=edge" />
  5. <meta content="text/html;charset=utf-8" http-equiv=Content-Type />
  6. <meta name=viewport content="user-scalable=1.0,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0" />
  7. <meta name=apple-mobile-web-app-capable content=yes />
  8. <meta name=format-detection content="telephone=no" />
  9. <meta name="robots" content="noindex,nofollow">
  10. <link type=text/css href="/styles/style.css" media="screen" rel="stylesheet" title="CSS" />
  11. {{{customCSSTags}}}
  12. <link rel="apple-touch-icon" href="/favicon-303x303.png" />
  13. {{{customJSTags}}}
  14. <title>{{{title1}}} - Download</title>
  15. </head>
  16. <body>
  17. <div id=container style=max-height:100vh>
  18. <div id=mastheadx></div>
  19. <div id=masthead style="background:url(logo.png) 0px 0px;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden">
  20. <div style="float:left;text-shadow: 1px 1px 2px #000">{{{titlehtml}}}</div>
  21. <div style=float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px>
  22. <strong><font style="font-size:46px;font-family:Arial,Helvetica,sans-serif;text-shadow: 1px 1px 2px #000">{{{title1}}}</font></strong>
  23. </div>
  24. <div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px>
  25. <strong><font style="font-size:14px;font-family:Arial,Helvetica,sans-serif;text-shadow: 1px 1px 2px #000">{{{title2}}}</font></strong>
  26. </div>
  27. </div>
  28. <div id=page_content style=max-height:calc(100vh-138px)>
  29. <div id=column_l>
  30. <h1>Download</h1>
  31. <p id="message" style=margin-left:20px></p>
  32. <br />
  33. </div>
  34. <div id=footer>
  35. <table cellpadding=0 cellspacing=10 style=width:100%>
  36. <tr>
  37. <td style=text-align:left></td>
  38. <td style=text-align:right>
  39. {{{rootCertLink}}}
  40. &nbsp;<a href=terms>Terms &amp; Privacy</a>
  41. </td>
  42. </tr>
  43. </table>
  44. </div>
  45. </div>
  46. </div>
  47. <script>
  48. var random = '{{{randomlength}}}' // Random length string for BREACH mitigation
  49. var messageid = parseInt('{{{messageid}}}');
  50. var fileurl = '{{{fileurl}}}';
  51. var filename = '{{{filename}}}';
  52. var filesize = parseInt('{{{filesize}}}');
  53. // Quick UI functions, a bit of a replacement for jQuery
  54. function Q(x) { return document.getElementById(x); } // "Q"
  55. function QS(x) { try { return Q(x).style; } catch (x) { } } // "Q" style
  56. function QE(x, y) { try { Q(x).disabled = !y; } catch (x) { } } // "Q" enable
  57. function QV(x, y) { try { QS(x).display = (y ? '' : 'none'); } catch (x) { } } // "Q" visible
  58. function QA(x, y) { Q(x).innerHTML += y; } // "Q" append
  59. function QH(x, y) { Q(x).innerHTML = y; } // "Q" html
  60. function QC(x) { try { return Q(x).classList; } catch (x) { } } // "Q" class
  61. function format(format) { var args = Array.prototype.slice.call(arguments, 1); return format.replace(/{(\d+)}/g, function (match, number) { return typeof args[number] != 'undefined' ? args[number] : match; }); };
  62. function EscapeHtml(x) { if (typeof x == 'string') return x.replace(/&/g, '&amp;').replace(/>/g, '&gt;').replace(/</g, '&lt;').replace(/"/g, '&quot;').replace(/'/g, '&apos;'); if (typeof x == 'boolean') return x; if (typeof x == 'number') return x; }
  63. if (messageid == 1) {
  64. var lenstr = (filesize == 1)?format("1 byte"):format("{0} bytes", filesize);
  65. QH('message', '<a href="' + fileurl + '">' + EscapeHtml(filename) + '</a>, ' + lenstr);
  66. } else if (messageid == 2) {
  67. QH('message', "Invalid file link");
  68. }
  69. </script>
  70. </body>
  71. </html>