Index: static/js/index.js |
=================================================================== |
--- a/static/js/index.js |
+++ b/static/js/index.js |
@@ -29,6 +29,18 @@ |
function init() |
{ |
container = document.getElementById("more-container"); |
+ if(document.getElementById("content").className.indexOf("edge") > -1) |
Sebastian Noack
2016/05/17 08:50:13
Perhaps moving this check inside checkEdgeSupport(
saroyanm
2016/05/17 12:38:54
Done.
|
+ checkEdgeSupport(); |
+ } |
+ |
+ function checkEdgeSupport() |
+ { |
+ if (!window.navigator.userAgent) |
saroyanm
2016/05/13 10:50:20
userAgent detection through navigator is deprecate
Sebastian Noack
2016/05/17 08:50:13
I don't think there is a different way to detect t
saroyanm
2016/05/17 12:38:53
Acknowledged.
|
+ return; |
+ |
+ var match = window.navigator.userAgent.match(/Edge\/(\d+.\d+)/); |
+ if (match && match.length > 0 && parseFloat(match[1]) >= 14.14342) |
Sebastian Noack
2016/05/17 08:50:13
The check for |match.length > 0| is redundant. If
saroyanm
2016/05/17 12:38:54
Done.
|
+ document.getElementById("content").className += " edge-supported"; |
Sebastian Noack
2016/05/17 08:50:13
How about using classList? We don't need to care a
saroyanm
2016/05/17 12:38:53
Good point
saroyanm
2016/05/17 12:38:54
Done.
|
} |
init(); |