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) |