From c35bc2699667e0a99d9b03b266d27fe51be1a25c Mon Sep 17 00:00:00 2001 From: Kim - DG9VH Date: Fri, 6 Nov 2020 23:10:49 +0100 Subject: [PATCH] Make Tab-showing configurable take a look at /html/js/config,js --- html/js/config.js | 10 +++++++++- html/js/functions.js | 23 +++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/html/js/config.js b/html/js/config.js index cefdfd5..1af30d4 100644 --- a/html/js/config.js +++ b/html/js/config.js @@ -6,4 +6,12 @@ var debug = 1; // Set messagecounters for different badge-colors var warnlevel = 200; -var emergencylevel = 500; \ No newline at end of file +var emergencylevel = 500; + + +// 1 = show tab, 0 = suppress it +var showLastHeardTab = 1; +var showLocalHeadTab = 1; +var showInQSOTab = 1; +var showDAPNETMessagesTab = 1; +var showAboutTab = 1; diff --git a/html/js/functions.js b/html/js/functions.js index 0d930b6..3ca61f8 100644 --- a/html/js/functions.js +++ b/html/js/functions.js @@ -332,3 +332,26 @@ function getDapnetMessages(document, event) { }); }); } + +$(document).ready(function() { + if(showLastHeardTab == 0){ + document.getElementById("myTab").children[0].style.display="none"; + document.getElementById("lastheard").style.display="none"; + } + if(showLocalHeadTab == 0){ + document.getElementById("myTab").children[1].style.display="none"; + document.getElementById("localheard").style.display="none"; + } + if(showInQSOTab == 0){ + document.getElementById("myTab").children[2].style.display="none"; + document.getElementById("qso").style.display="none"; + } + if(showDAPNETMessagesTab == 0){ + document.getElementById("myTab").children[3].style.display="none"; + document.getElementById("dapnet").style.display="none"; + } + if(showAboutTab == 0){ + document.getElementById("myTab").children[4].style.display="none"; + document.getElementById("about").style.display="none"; + } +});