From aecb45fe0733ca00af70687769a3ca4e05f7c74f Mon Sep 17 00:00:00 2001 From: Cryptkeeper Date: Mon, 20 Jun 2016 18:14:06 -0500 Subject: [PATCH] Remove category visibility controller --- assets/css/main.css | 5 ----- assets/html/index.html | 8 -------- assets/js/site.js | 6 ------ assets/js/util.js | 13 +++++-------- 4 files changed, 5 insertions(+), 27 deletions(-) diff --git a/assets/css/main.css b/assets/css/main.css index d343b24..4749a29 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -72,11 +72,6 @@ a { float: left; } -/* Category controls */ -#category-controller { - display: none; -} - /* Footer */ #footer { width: 1540px; diff --git a/assets/html/index.html b/assets/html/index.html index 204ebb1..6e390f6 100644 --- a/assets/html/index.html +++ b/assets/html/index.html @@ -35,14 +35,6 @@

Source code available on Github

Made with by Cryptkeeper

-
- -
- - Show Categories // Hide Categories - -
- diff --git a/assets/js/site.js b/assets/js/site.js index e0fbda7..b1d9e37 100644 --- a/assets/js/site.js +++ b/assets/js/site.js @@ -228,8 +228,6 @@ $(document).ready(function() { $('#big-graph-checkboxes').html(''); $('#big-graph-controls').css('display', 'none'); - $('#category-controller').css('display', 'none'); - $("#stat_totalPlayers").text(0); $("#stat_networks").text(0); @@ -316,10 +314,6 @@ $(document).ready(function() { }); socket.on('add', function(servers) { - if (Object.keys(publicConfig.categories).length > 1) { - $('#category-controller').css('display', 'block'); - } - for (var i = 0; i < servers.length; i++) { var history = servers[i]; var listing = []; diff --git a/assets/js/util.js b/assets/js/util.js index beb4af8..cf0fb1e 100644 --- a/assets/js/util.js +++ b/assets/js/util.js @@ -16,16 +16,13 @@ function setPublicConfig(json) { createdCategories = false; createCategories(); - setCategoriesVisible(publicConfig.categoriesVisible); -} -function setCategoriesVisible(newCategoriesVisible) { - categoriesVisible = newCategoriesVisible; + if (publicConfig.categoriesVisible) { + $('.category-header').css('display', 'block'); + $('.server-container').css('margin', '10px auto'); - $('.category-header').css('display', (categoriesVisible ? 'block' : 'none')); - $('.server-container').css('margin', (categoriesVisible ? '10px auto' : '0 auto')); - - sortServers(); + sortServers(); + } } function createCategories() {