LEFT | RIGHT |
1 (function() | 1 (function() |
2 { | 2 { |
3 document.documentElement.className = "js"; | |
4 | |
5 var visibleTab; | 3 var visibleTab; |
6 var container = document.getElementById("more-container"); | 4 var container = document.getElementById("more-container"); |
7 | 5 |
8 window.toggleMore = function() | 6 window.toggleMore = function() |
9 { | 7 { |
10 if (container.className == "hidden") | 8 if (container.className == "hidden") |
11 container.className = visibleTab || getDefaultTab(); | 9 container.className = visibleTab || getDefaultTab(); |
12 else | 10 else |
13 container.className = "hidden"; | 11 container.className = "hidden"; |
14 } | 12 } |
15 | 13 |
16 window.showTab = function(button) | 14 window.showTab = function(button) |
17 { | 15 { |
18 var id = button.id.substr(5); | 16 var id = button.id.substr(5); |
19 container.className = id; | 17 container.className = id; |
20 visibleTab = id; | 18 visibleTab = id; |
21 } | 19 } |
22 | 20 |
23 function getDefaultTab() | 21 function getDefaultTab() |
24 { | 22 { |
25 var content = document.getElementById("content"); | 23 var content = document.getElementById("content"); |
26 var ua = content.className.match(/ua\-([^\s]+)/); | 24 var ua = content.className.match(/ua\-([^\s]+)/); |
27 visibleTab = ua && ua[1] || "firefox"; | 25 visibleTab = ua && ua[1] || "firefox"; |
28 return visibleTab; | 26 return visibleTab; |
29 } | 27 } |
30 | 28 |
31 })(); | 29 })(); |
LEFT | RIGHT |