Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(534)

Unified Diff: native_client_sdk/src/web/manifest.html

Issue 11183023: [NaCl SDK] Update manifest.html. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/web/manifest.html
diff --git a/native_client_sdk/src/web/manifest.html b/native_client_sdk/src/web/manifest.html
index e0425ab09e7f4272e45f5921ee3c50b11605980a..553d856ff4849cb0e83cec459253a1cddd4e4110 100644
--- a/native_client_sdk/src/web/manifest.html
+++ b/native_client_sdk/src/web/manifest.html
@@ -1,9 +1,10 @@
<!DOCTYPE html>
<!-- much of this is stolen from omahaproxy.appspot.com/viewer -->
-<html>
- <head>
- <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
- </head>
+<html>
+ <head>
+ <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
+ <title>NaCl SDK Manifest Viewer</title>
+ </head>
<style type="text/css" media="screen">
body {
font-family: monospace;
@@ -39,15 +40,20 @@
tbody tr:hover {
background-color: orange;
}
+
+ td a {
+ padding: 3px;
+ }
</style>
- <body>
+ <body>
+ <h1>NaCl SDK Manifest Viewer</h1>
<table>
<thead id="columns">
</thead>
<tbody id="rows">
</tbody>
</table>
- <script type="application/javascript">
+ <script type="application/javascript">
function loadJson(url, callback) {
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
@@ -79,7 +85,7 @@
// Create the column headers.
var tr = document.createElement('tr');
- var columns = ['name', 'version', 'revision'];
+ var columns = ['name', 'version', 'revision', 'win', 'mac', 'linux'];
for (var i = 0; i < columns.length; ++i) {
var td = document.createElement('td');
var text = document.createTextNode(columns[i]);
@@ -88,12 +94,27 @@
}
columnsElm.appendChild(tr);
+ var platforms = ['win', 'mac', 'linux'];
+
for (var i = 0; i < data.length; ++i) {
var tr = document.createElement('tr');
for (var j = 0; j < columns.length; ++j) {
var td = document.createElement('td');
- var text = document.createTextNode(data[i][columns[j]]);
- td.appendChild(text);
+ var node;
+ if (platforms.indexOf(columns[j]) != -1) {
+ var archives = data[i].archives;
+ for (var k = 0; k < archives.length; ++k) {
+ if (columns[j] == archives[k].host_os) {
+ node = document.createElement('a');
+ node.setAttribute('href', archives[k].url);
+ node.appendChild(document.createTextNode(columns[j]));
+ td.appendChild(node);
+ }
+ }
+ } else {
+ node = document.createTextNode(data[i][columns[j]]);
+ td.appendChild(node);
+ }
tr.appendChild(td);
}
rowsElm.appendChild(tr);
@@ -101,6 +122,6 @@
}
loadJson('naclsdk_manifest2.json', display);
- </script>
- </body>
+ </script>
+ </body>
</html>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698