inline the toggle_element function

This commit is contained in:
mappu 2017-12-10 12:19:35 +13:00
parent 149e226729
commit 92e7064372

View File

@ -6,11 +6,6 @@ var $chatArea = document.getElementById("chatarea");
var $selHub = document.getElementById("selHub"); var $selHub = document.getElementById("selHub");
var $frmHub = document.getElementById("frmHub"); var $frmHub = document.getElementById("frmHub");
function toggle_element(id) {
var e = document.getElementById(id);
e.style.display = (e.style.display == 'none') ? 'block' : 'none';
}
function urldesc(s) { function urldesc(s) {
return decodeURIComponent(s.replace(/\+/g, " ")); return decodeURIComponent(s.replace(/\+/g, " "));
} }
@ -67,9 +62,8 @@ function fontSize(change) {
} }
function toggleMenu() { function toggleMenu() {
toggle_element("tr1"); var $container = document.getElementById("menu-container");
toggle_element("tr2"); $container.style.display = ($container.style.display == 'block') ? 'none' : 'block';
toggle_element("spm");
} }
function highlightLine(no) { function highlightLine(no) {