Home | History | Annotate | Download | only in base
      1 <!DOCTYPE html>
      2 
      3 <html>
      4 
      5 <head>
      6 
      7 <script>
      8 function addRow(name, url, isdir, size, date_modified) {
      9   if (name == ".")
     10     return;
     11 
     12   var root = "" + document.location;
     13   if (root.substr(-1) !== "/")
     14     root += "/";
     15 
     16   var table = document.getElementById("table");
     17   var row = document.createElement("tr");
     18   var file_cell = document.createElement("td");
     19   var link = document.createElement("a");
     20 
     21   link.className = isdir ? "icon dir" : "icon file";
     22 
     23   if (name == "..") {
     24     link.href = root + "..";
     25     link.innerText = document.getElementById("parentDirText").innerText;
     26     link.className = "icon up";
     27     size = "";
     28     date_modified = "";
     29   } else {
     30     if (isdir) {
     31       name = name + "/";
     32       url = url + "/";
     33       size = "";
     34     }
     35     link.innerText = name;
     36     link.href = root + url;
     37   }
     38   file_cell.appendChild(link);
     39 
     40   row.appendChild(file_cell);
     41   row.appendChild(createCell(size));
     42   row.appendChild(createCell(date_modified));
     43 
     44   table.appendChild(row);
     45 }
     46 
     47 function createCell(text) {
     48   var cell = document.createElement("td");
     49   cell.setAttribute("class", "detailsColumn");
     50   cell.innerText = text;
     51   return cell;
     52 }
     53 
     54 function start(location) {
     55   var header = document.getElementById("header");
     56   header.innerText = header.innerText.replace("LOCATION", location);
     57 
     58   document.getElementById("title").innerText = header.innerText;
     59 }
     60 
     61 function onListingParsingError() {
     62   var box = document.getElementById("listingParsingErrorBox");
     63   box.innerHTML = box.innerHTML.replace("LOCATION", encodeURI(document.location)
     64       + "?raw");
     65   box.style.display = "block";
     66 }
     67 </script>
     68 
     69 <style>
     70 
     71   h1 {
     72     border-bottom: 1px solid #c0c0c0;
     73     margin-bottom: 10px;
     74     padding-bottom: 10px;
     75     white-space: nowrap;
     76   }
     77 
     78   table {
     79     border-collapse: collapse;
     80   }
     81 
     82   tr.header {
     83     font-weight: bold;
     84   }
     85 
     86   td.detailsColumn {
     87     padding-left: 2em;
     88     text-align: right;
     89     white-space: nowrap;
     90   }
     91 
     92   a.icon {
     93     padding-left: 1.5em;
     94     text-decoration: none;
     95   }
     96 
     97   a.icon:hover {
     98     text-decoration: underline;
     99   }
    100 
    101   a.file {
    102     background : url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAABnRSTlMAAAAAAABupgeRAAABHUlEQVR42o2RMW7DIBiF3498iHRJD5JKHurL+CRVBp+i2T16tTynF2gO0KSb5ZrBBl4HHDBuK/WXACH4eO9/CAAAbdvijzLGNE1TVZXfZuHg6XCAQESAZXbOKaXO57eiKG6ft9PrKQIkCQqFoIiQFBGlFIB5nvM8t9aOX2Nd18oDzjnPgCDpn/BH4zh2XZdlWVmWiUK4IgCBoFMUz9eP6zRN75cLgEQhcmTQIbl72O0f9865qLAAsURAAgKBJKEtgLXWvyjLuFsThCSstb8rBCaAQhDYWgIZ7myM+TUBjDHrHlZcbMYYk34cN0YSLcgS+wL0fe9TXDMbY33fR2AYBvyQ8L0Gk8MwREBrTfKe4TpTzwhArXWi8HI84h/1DfwI5mhxJamFAAAAAElFTkSuQmCC ") left top no-repeat;
    103   }
    104 
    105   a.dir {
    106     background : url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAd5JREFUeNqMU79rFUEQ/vbuodFEEkzAImBpkUabFP4ldpaJhZXYm/RiZWsv/hkWFglBUyTIgyAIIfgIRjHv3r39MePM7N3LcbxAFvZ2b2bn22/mm3XMjF+HL3YW7q28YSIw8mBKoBihhhgCsoORot9d3/ywg3YowMXwNde/PzGnk2vn6PitrT+/PGeNaecg4+qNY3D43vy16A5wDDd4Aqg/ngmrjl/GoN0U5V1QquHQG3q+TPDVhVwyBffcmQGJmSVfyZk7R3SngI4JKfwDJ2+05zIg8gbiereTZRHhJ5KCMOwDFLjhoBTn2g0ghagfKeIYJDPFyibJVBtTREwq60SpYvh5++PpwatHsxSm9QRLSQpEVSd7/TYJUb49TX7gztpjjEffnoVw66+Ytovs14Yp7HaKmUXeX9rKUoMoLNW3srqI5fWn8JejrVkK0QcrkFLOgS39yoKUQe292WJ1guUHG8K2o8K00oO1BTvXoW4yasclUTgZYJY9aFNfAThX5CZRmczAV52oAPoupHhWRIUUAOoyUIlYVaAa/VbLbyiZUiyFbjQFNwiZQSGl4IDy9sO5Wrty0QLKhdZPxmgGcDo8ejn+c/6eiK9poz15Kw7Dr/vN/z6W7q++091/AQYA5mZ8GYJ9K0AAAAAASUVORK5CYII= ") left top no-repeat;
    107   }
    108 
    109   a.up {
    110     background : url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmlJREFUeNpsU0toU0EUPfPysx/tTxuDH9SCWhUDooIbd7oRUUTMouqi2iIoCO6lceHWhegy4EJFinWjrlQUpVm0IIoFpVDEIthm0dpikpf3ZuZ6Z94nrXhhMjM3c8895977BBHB2PznK8WPtDgyWH5q77cPH8PpdXuhpQT4ifR9u5sfJb1bmw6VivahATDrxcRZ2njfoaMv+2j7mLDn93MPiNRMvGbL18L9IpF8h9/TN+EYkMffSiOXJ5+hkD+PdqcLpICWHOHc2CC+LEyA/K+cKQMnlQHJX8wqYG3MAJy88Wa4OLDvEqAEOpJd0LxHIMdHBziowSwVlF8D6QaicK01krw/JynwcKoEwZczewroTvZirlKJs5CqQ5CG8pb57FnJUA0LYCXMX5fibd+p8LWDDemcPZbzQyjvH+Ki1TlIciElA7ghwLKV4kRZstt2sANWRjYTAGzuP2hXZFpJ/GsxgGJ0ox1aoFWsDXyyxqCs26+ydmagFN/rRjymJ1898bzGzmQE0HCZpmk5A0RFIv8Pn0WYPsiu6t/Rsj6PauVTwffTSzGAGZhUG2F06hEc9ibS7OPMNp6ErYFlKavo7MkhmTqCxZ/jwzGA9Hx82H2BZSw1NTN9Gx8ycHkajU/7M+jInsDC7DiaEmo1bNl1AMr9ASFgqVu9MCTIzoGUimXVAnnaN0PdBBDCCYbEtMk6wkpQwIG0sn0PQIUF4GsTwLSIFKNqF6DVrQq+IWVrQDxAYQC/1SsYOI4pOxKZrfifiUSbDUisif7XlpGIPufXd/uvdvZm760M0no1FZcnrzUdjw7au3vu/BVgAFLXeuTxhTXVAAAAAElFTkSuQmCC ") left top no-repeat;
    111   }
    112 
    113   #listingParsingErrorBox {
    114     border: 1px solid black;
    115     background: #fae691;
    116     padding: 10px;
    117     display: none;
    118   }
    119 </style>
    120 
    121 <title id="title"></title>
    122 
    123 </head>
    124 
    125 <body>
    126 
    127 <div id="listingParsingErrorBox" i18n-values=".innerHTML:listingParsingErrorBoxText"></div>
    128 
    129 <span id="parentDirText" style="display:none" i18n-content="parentDirText"></span>
    130 
    131 <h1 id="header" i18n-content="header"></h1>
    132 
    133 <table id="table">
    134   <tr class="header">
    135     <td i18n-content="headerName"></td>
    136     <td class="detailsColumn" i18n-content="headerSize"></td>
    137     <td class="detailsColumn" i18n-content="headerDateModified"></td>
    138   </tr>
    139 </table>
    140 
    141 </body>
    142 
    143 </html>
    144