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

Side by Side Diff: src/site/js/download-info.js

Issue 701913002: Editing Sam's downloads page (Closed) Base URL: https://github.com/dart-lang/www.dartlang.org.git@master
Patch Set: incorporate Sam's review comments Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « src/site/css/dart-style.css ('k') | src/site/js/os-switcher.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 $(document).ready(function() { 1 $(document).ready(function() {
2 $.getJSON( 2 $.getJSON(
3 "https://storage.googleapis.com/dart-archive/channels/dev/release/latest/VER SION", 3 "https://storage.googleapis.com/dart-archive/channels/dev/release/latest/VER SION",
4 function( data ) { 4 function( data ) {
5 var date = data.date; 5 var date = data.date;
6 var revDate = date.substr(0,4) + "-" + date.substr(4,2) + "-" + date.sub str(6,2); 6 var revDate = date.substr(0,4) + "-" + date.substr(4,2) + "-" + date.sub str(6,2);
7 $(".dev-channel").append($("<strong></strong>").text("version " +data.ve rsion)) 7 $(".dev-channel").append($("<strong></strong>").text("version " +data.ve rsion))
8 .append($("<span></span>").text(", built on " + revDate )) 8 .append($("<span></span>").text(", built on " + revDate ))
9 .append($("<span></span>").text(", at revision " + data .revision)); 9 .append($("<span></span>").text(", at revision " + data .revision));
10 }); 10 });
11
12 $(".has-sha").each(getSha);
13 }); 11 });
14
15 function getSha(el) {
16 var button = $(el);
17 var shaUrl = button.attr("href") + ".sha256sum";
18 $.get(
19 shaUrl,
20 function( data ) {
21 var space = data.indexOf(" ");
22 if (space == -1) { return; }
23
24 var sha = data.substring(0, space);
25 var a = $("<a></a>")
26 .attr("href", shaUrl)
27 .addClass("sha")
28 .text("SHA-256: " + sha);
29 button.after(' ').after(a).after(' ');
30 }).fail(function () {});
31 }
OLDNEW
« no previous file with comments | « src/site/css/dart-style.css ('k') | src/site/js/os-switcher.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698