[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [nyx/master] Iterate over panes rather than hardcoded list
commit 15c8fe553bf1402a31246787648f706af35bc7b9
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Thu Jul 27 21:10:20 2017 -0700
Iterate over panes rather than hardcoded list
---
web/index.html | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/web/index.html b/web/index.html
index 75ff1e6..55b3263 100644
--- a/web/index.html
+++ b/web/index.html
@@ -188,19 +188,17 @@
<script>
$(function() {
- $(".tabs").tabs(".panes > .content", { history: true });
-
// when provided an anchor select the tab it resides within
var anchor = window.location.hash;
- var tabs = $(".tabs").data("tabs");
-
- if ($("#home").find(anchor).length) {
- tabs.click("home");
- } else if ($("#faq").find(anchor).length) {
- tabs.click("faq");
- } else if ($("#download").find(anchor).length) {
- tabs.click("download");
+ $(".tabs").tabs(".panes > .content", { history: true });
+
+ if (anchor) {
+ $(".panes").children().each(function () {
+ if ($(this).find(anchor).length) {
+ $(".tabs").data("tabs").click(this.id);
+ }
+ });
}
// show/hide for FAQ questions
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits