From 971841d73b65d1754276a124887ec3168b0cd863 Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Sun, 27 Oct 2019 02:25:18 -0700 Subject: [PATCH] thrimbletrimmer: Move last bit of code into IO.js since everything else is there anyway. --- thrimbletrimmer/index.html | 25 ------------------------- thrimbletrimmer/scripts/IO.js | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 25 deletions(-) diff --git a/thrimbletrimmer/index.html b/thrimbletrimmer/index.html index eceb298..b64b52d 100644 --- a/thrimbletrimmer/index.html +++ b/thrimbletrimmer/index.html @@ -120,31 +120,6 @@ -
Sign out diff --git a/thrimbletrimmer/scripts/IO.js b/thrimbletrimmer/scripts/IO.js index 16225e9..8a6c70f 100644 --- a/thrimbletrimmer/scripts/IO.js +++ b/thrimbletrimmer/scripts/IO.js @@ -90,6 +90,32 @@ setStreamRange = function() { document.getElementById("StreamEnd").value = bustimeToTimestamp(document.getElementById("BusTimeEnd").value); } +toggleHiddenPane = function(paneID) { + var pane = document.getElementById(paneID); + pane.style.display = (pane.style.display === "none") ? "block":"none"; +} + +toggleUltrawide = function() { + var body = document.getElementsByTagName("Body")[0]; + body.classList.contains("ultrawide") ? body.classList.remove("ultrawide"):body.classList.add("ultrawide"); +} + +toggleTimeInput = function(toggleInput) { + if(toggleInput == "UTC") { + setStreamRange(); + document.getElementById("BusTimeStart").style.display = "none"; + document.getElementById("BusTimeEnd").style.display = "none"; + document.getElementById("StreamStart").style.display = ""; + document.getElementById("StreamEnd").style.display = ""; + } else { + setBustimeRange(); + document.getElementById("StreamStart").style.display = "none"; + document.getElementById("StreamEnd").style.display = "none"; + document.getElementById("BusTimeStart").style.display = ""; + document.getElementById("BusTimeEnd").style.display = ""; + } +} + // For a given select input element id, add the given list of options. // If selected is given, it should be the name of an option to select. // Otherwise the first one is used.