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

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

Issue 29703633: Noissue - Abstracted embedded video for use in blog (Closed) Base URL: https://hg.adblockplus.org/web.adblockplus.org
Left Patch Set: Created Feb. 20, 2018, 10:13 p.m.
Right Patch Set: Addressed #9 and added urlencode to innerHTML Created Feb. 27, 2018, 1:09 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/css/main.css ('k') | static/js/main.js » ('j') | 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 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 })();
LEFTRIGHT

Powered by Google App Engine
This is Rietveld