OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 cr.define('offlineInternals', function() { | 5 cr.define('offlineInternals', function() { |
6 'use strict'; | 6 'use strict'; |
7 | 7 |
8 /** @type {!Array<OfflinePage>} */ | 8 /** @type {!Array<OfflinePage>} */ |
9 var offlinePages = []; | 9 var offlinePages = []; |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 var checkbox = document.createElement('input'); | 31 var checkbox = document.createElement('input'); |
32 checkbox.setAttribute('type', 'checkbox'); | 32 checkbox.setAttribute('type', 'checkbox'); |
33 checkbox.setAttribute('name', 'stored'); | 33 checkbox.setAttribute('name', 'stored'); |
34 checkbox.setAttribute('value', pages[i].id); | 34 checkbox.setAttribute('value', pages[i].id); |
35 | 35 |
36 checkboxCell.appendChild(checkbox); | 36 checkboxCell.appendChild(checkbox); |
37 row.appendChild(checkboxCell); | 37 row.appendChild(checkboxCell); |
38 | 38 |
39 var cell = document.createElement('td'); | 39 var cell = document.createElement('td'); |
40 var link = document.createElement('a'); | 40 var link = document.createElement('a'); |
41 link.setAttribute('href', pages[i].filePath); | 41 link.setAttribute('href', pages[i].onlineUrl); |
42 link.textContent = pages[i].onlineUrl; | 42 link.textContent = pages[i].onlineUrl; |
43 cell.appendChild(link); | 43 cell.appendChild(link); |
44 row.appendChild(cell); | 44 row.appendChild(cell); |
45 | 45 |
46 cell = document.createElement('td'); | 46 cell = document.createElement('td'); |
47 cell.textContent = pages[i].namespace; | 47 cell.textContent = pages[i].namespace; |
48 row.appendChild(cell); | 48 row.appendChild(cell); |
49 | 49 |
50 cell = document.createElement('td'); | 50 cell = document.createElement('td'); |
51 cell.textContent = Math.round(pages[i].size / 1024); | 51 cell.textContent = Math.round(pages[i].size / 1024); |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 refreshAll(); | 296 refreshAll(); |
297 } | 297 } |
298 | 298 |
299 // Return an object with all of the exports. | 299 // Return an object with all of the exports. |
300 return { | 300 return { |
301 initialize: initialize, | 301 initialize: initialize, |
302 }; | 302 }; |
303 }); | 303 }); |
304 | 304 |
305 document.addEventListener('DOMContentLoaded', offlineInternals.initialize); | 305 document.addEventListener('DOMContentLoaded', offlineInternals.initialize); |
OLD | NEW |