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

Unified Diff: static/js/index.js

Issue 29341378: Issue 4027 - make the download button available for windows insider users (Closed)
Patch Set: Created May 18, 2016, 12:13 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « static/img/edge_teaser.png ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: static/js/index.js
===================================================================
--- a/static/js/index.js
+++ b/static/js/index.js
@@ -29,6 +29,19 @@
function init()
{
container = document.getElementById("more-container");
+ checkEdgeSupport();
+ }
+
+ function checkEdgeSupport()
+ {
+ if (!window.navigator.userAgent)
+ return;
+
+ var content = document.getElementById("content");
+ var match = window.navigator.userAgent.match(/Edge\/(\d+.\d+)/);
+ 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
+ content.classList.contains("edge"))
+ content.classList.add("edge-supported");
}
init();
« no previous file with comments | « static/img/edge_teaser.png ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld