| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| 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 11 matching lines...) Expand all Loading... | |
| 22 { | 22 { |
| 23 var content = document.getElementById("content"); | 23 var content = document.getElementById("content"); |
| 24 var ua = content.className.match(/ua\-([^\s]+)/); | 24 var ua = content.className.match(/ua\-([^\s]+)/); |
| 25 visibleTab = ua && ua[1] || "firefox"; | 25 visibleTab = ua && ua[1] || "firefox"; |
| 26 return visibleTab; | 26 return visibleTab; |
| 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(); | |
| 33 } | |
| 34 | |
| 35 function checkEdgeSupport() | |
| 36 { | |
| 37 var content = document.getElementById("content"); | |
| 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; | |
| 40 | |
| 41 var match = window.navigator.userAgent.match(/Edge\/(\d+.\d+)/); | |
| 42 if (match && parseFloat(match[1]) >= 14.14342) | |
| 43 content.classList.add("edge-supported"); | |
| 32 } | 44 } |
| 33 | 45 |
| 34 init(); | 46 init(); |
| 35 })(); | 47 })(); |
| OLD | NEW |