From 67c81dd7e5f0b5aec80ca2af6c5c8eb680977dae Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Fri, 4 Mar 2016 22:05:43 +0100 Subject: [PATCH] Added support for filter tier by URL --- public/js/tiers.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/public/js/tiers.js b/public/js/tiers.js index 63ee300..d35b766 100644 --- a/public/js/tiers.js +++ b/public/js/tiers.js @@ -318,9 +318,19 @@ $("table.table.list").click(function (e) { }) + $(document).ready(function () { makeObject(function (arr) { - populateTable(arr) populateTierFilter() + if (window.location.hash) { + tr = window.location.hash + tr = tr.replace("#", "") + filterFunc(arr, tr, false, function (newObj) { + populateTable(newObj); + }) + } + else { + populateTable(arr) + } }) }); \ No newline at end of file