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

Unified Diff: static/js/main.js

Issue 29348931: Issue 4189 - Sections not expanding on the blog page on adblockplus.org (Closed)
Patch Set: Created Aug. 1, 2016, 2:58 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: static/js/main.js
===================================================================
--- a/static/js/main.js
+++ b/static/js/main.js
@@ -43,16 +43,21 @@
window.event.cancelBubble = true;
else
event.stopPropagation();
}
function initLanguageSelection()
{
var language = document.getElementById("language");
+
+ // skip if page does not have language selection (EG: blog)
+ if (!language)
+ return;
+
var languageSelection = language.getElementsByTagName("ul")[0];
document.documentElement.onclick = function()
{
removeClass(languageSelection, "visible");
};
language.onclick = function(event)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld