Index: static/js/main.js |
=================================================================== |
--- a/static/js/main.js |
+++ b/static/js/main.js |
@@ -43,16 +43,19 @@ |
window.event.cancelBubble = true; |
else |
event.stopPropagation(); |
} |
function initLanguageSelection() |
{ |
var language = document.getElementById("language"); |
+ if (!language) |
saroyanm
2016/09/28 12:34:27
Detail: I think it make sense to have a small comm
|
+ return; |
+ |
var languageSelection = language.getElementsByTagName("ul")[0]; |
document.documentElement.onclick = function() |
{ |
removeClass(languageSelection, "visible"); |
}; |
language.onclick = function(event) |
@@ -76,17 +79,17 @@ |
if (hasClass(element, "selected") || element.id == "hamburger") |
{ |
if ("querySelector" in document) |
{ |
event.preventDefault(); |
toggleClass(document.querySelector("header nav > ul"), "visible"); |
} |
return false; |
- } |
+ } |
element = element.parentElement; |
} |
} |
function initMenu() |
{ |
if ("querySelector" in document) |
document.querySelector("header nav").onclick = navigationClick; |