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

Side by Side Diff: static/js/main.js

Issue 29558641: Issue 5740 - Implemented new abp.org footer styles (Closed) Base URL: https://bitbucket.org/adblockplus/adblockplus.org
Patch Set: Addressed comments Created Oct. 11, 2017, 1:11 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « static/img/footer-youtube-glyphicon.png ('k') | templates/default.tmpl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 "use strict"; 1 "use strict";
2 2
3 (function() 3 (function()
4 { 4 {
5 function escapeRegExp(string) 5 function escapeRegExp(string)
6 { 6 {
7 return string.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); 7 return string.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
8 } 8 }
9 9
10 function hasClass(element, className) 10 function hasClass(element, className)
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 function navigationClick(event) 62 function navigationClick(event)
63 { 63 {
64 toggleClass(document.getElementById("navbar-menu"), "visible"); 64 toggleClass(document.getElementById("navbar-menu"), "visible");
65 } 65 }
66 66
67 function initMenu() 67 function initMenu()
68 { 68 {
69 document.getElementById("navbar-menu-toggle").onclick = navigationClick; 69 document.getElementById("navbar-menu-toggle").onclick = navigationClick;
70 } 70 }
71 71
72 function initFooterSection(section)
73 {
74 var header = section.getElementsByTagName("h1")[0];
75 header.onclick = function()
76 {
77 toggleClass(section, "visible");
78 };
79 }
80
81 function initFooter()
82 {
83 var footerContent = document.getElementById("footer-content");
84 var footerNav = footerContent.getElementsByTagName("nav")[0];
85 var footerNavSections = footerNav.getElementsByTagName("section");
86
87 for (var i = 0; i < footerNavSections.length; i++)
88 {
89 var section = footerNavSections[i];
90 initFooterSection(section);
91 }
92 }
93
94 initLanguageSelection(); 72 initLanguageSelection();
95 initMenu(); 73 initMenu();
96 initFooter();
97 })(); 74 })();
OLDNEW
« no previous file with comments | « static/img/footer-youtube-glyphicon.png ('k') | templates/default.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld