Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: static/js/index.js

Issue 29341378: Issue 4027 - make the download button available for windows insider users (Closed)
Left Patch Set: Created May 17, 2016, 12:37 p.m.
Right Patch Set: Created May 18, 2016, 12:13 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « static/img/edge_teaser.png ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 (function() 1 (function()
2 { 2 {
3 var visibleTab; 3 var visibleTab;
4 var container; 4 var container;
5 5
6 window.toggleMore = function() 6 window.toggleMore = function()
7 { 7 {
8 if (container.className == "hidden") 8 if (container.className == "hidden")
9 container.className = visibleTab || getDefaultTab(); 9 container.className = visibleTab || getDefaultTab();
10 else 10 else
(...skipping 16 matching lines...) Expand all
27 } 27 }
28 28
29 function init() 29 function init()
30 { 30 {
31 container = document.getElementById("more-container"); 31 container = document.getElementById("more-container");
32 checkEdgeSupport(); 32 checkEdgeSupport();
33 } 33 }
34 34
35 function checkEdgeSupport() 35 function checkEdgeSupport()
36 { 36 {
37 var content = document.getElementById("content"); 37 if (!window.navigator.userAgent)
38 if(content.className.indexOf("edge") == -1 || !window.navigator.userAgent)
Sebastian Noack 2016/05/17 17:02:11 If you put the check here below the UA check, it w
Sebastian Noack 2016/05/17 17:02:11 Nit: Missing space after "if".
saroyanm 2016/05/18 12:03:41 Done.
saroyanm 2016/05/18 12:03:41 Done.
39 return; 38 return;
40 39
40 var content = document.getElementById("content");
41 var match = window.navigator.userAgent.match(/Edge\/(\d+.\d+)/); 41 var match = window.navigator.userAgent.match(/Edge\/(\d+.\d+)/);
42 if (match && parseFloat(match[1]) >= 14.14342) 42 if (match && parseFloat(match[1]) >= 14.14342 &&
Oleksandr 2016/05/18 12:53:15 14 is a version of an EdgeHTML. 14342 is a Windows
Sebastian Noack 2016/05/18 12:57:25 Yeah, I agree. However, it seems, the change alrea
43 content.classList.contains("edge"))
43 content.classList.add("edge-supported"); 44 content.classList.add("edge-supported");
44 } 45 }
45 46
46 init(); 47 init();
47 })(); 48 })();
LEFTRIGHT

Powered by Google App Engine
This is Rietveld