From af403dd253d837867b4446806ce72a7860359944 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 4 Sep 2019 19:20:38 +0100 Subject: [PATCH] cw script --- webinterface.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/webinterface.py b/webinterface.py index 7209009eb..eafcf058b 100644 --- a/webinterface.py +++ b/webinterface.py @@ -1167,9 +1167,6 @@ def clickToDropDownScript() -> str: """Function run onclick to create a dropdown """ script= \ - 'function toggler(divId) {' \ - ' $("#" + divId).toggle();' \ - '}' \ 'function dropdown() {' \ ' document.getElementById("myDropdown").classList.toggle("show");' \ '}' @@ -1191,13 +1188,8 @@ def contentWarningScript() -> str: """Returns a script used for content warnings """ script= \ - 'function showContentWarning(postID) {' \ - ' var x = document.getElementById(postID);' \ - ' if (x.style.display === "none") {' \ - ' x.style.display = "block";' \ - ' } else {' \ - ' x.style.display = "none";' \ - ' }' \ + 'function toggler(divId) {' \ + ' $("#" + divId).toggle();' \ '}' return script