From 0e4de95f9774ea014825c643332d1bc9263bc87b Mon Sep 17 00:00:00 2001 From: simon Date: Wed, 15 Sep 2021 20:47:26 +0700 Subject: [PATCH] moove animate function to general script --- tubearchivist/static/progress.js | 7 ------- tubearchivist/static/script.js | 9 +++++++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/tubearchivist/static/progress.js b/tubearchivist/static/progress.js index ee61c1a..6e5acf6 100644 --- a/tubearchivist/static/progress.js +++ b/tubearchivist/static/progress.js @@ -71,10 +71,3 @@ function buildDownloadMessage(dlProgress) { message.appendChild(messageText); box.appendChild(message); }; - -function animate(elementId, animationClass) { - var toAnimate = document.getElementById(elementId); - if (toAnimate.className !== animationClass) { - toAnimate.className = animationClass; - } -} diff --git a/tubearchivist/static/script.js b/tubearchivist/static/script.js index 8f8a377..51e4a8b 100644 --- a/tubearchivist/static/script.js +++ b/tubearchivist/static/script.js @@ -82,7 +82,6 @@ function downloadNow(button) { // settings page buttons function manualImport() { var payload = JSON.stringify({'manual-import': true}); - console.log(payload); sendPost(payload); // clear button var message = document.createElement('p'); @@ -258,7 +257,6 @@ function showSearch() { } function showForm() { - console.log('show hidden form'); var formElement = document.getElementById('hidden-form'); var displayStyle = formElement.style.display if (displayStyle === "") { @@ -268,3 +266,10 @@ function showForm() { formElement.style.display = ""; } } + +function animate(elementId, animationClass) { + var toAnimate = document.getElementById(elementId); + if (toAnimate.className !== animationClass) { + toAnimate.className = animationClass; + } +}