From 96efe20d9a9ccda60345335377c5f89b7e51ec6a Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Mon, 5 Feb 2024 20:03:36 +1300 Subject: [PATCH] web: Disable the copy notes button when using custom palette --- thumb.html | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/thumb.html b/thumb.html index 5f2753c..677ca5a 100644 --- a/thumb.html +++ b/thumb.html @@ -33,6 +33,8 @@ let domAdvancedWrap = null; let domInputView = null; let domOutputView = null; +let domCopyOrDownload = null; +let domOnlyDownload = null; let ctxInput = null; let ctxOutput = null; let inputImage = null; @@ -59,12 +61,15 @@ domAdvancedWrap = document.getElementById("advanced_wrap"); domInputView = document.getElementById("input_view"); domOutputView = document.getElementById("output_view"); + domCopyOrDownload = document.getElementById("copy_or_download"); + domOnlyDownload = document.getElementById("only_download"); ctxInput = domInputView.getContext("2d"); ctxOutput = domOutputView.getContext("2d"); ctxOutput.imageSmoothingEnabled = false; hitCountRequest('thumb', '-1a9p7wtyt50p3'); + onChange(); } window.addEventListener("load", onLoad); @@ -194,8 +199,19 @@ } } +function setDownloadMessage() { + if (domCustomPal.checked) { + domCopyOrDownload.classList.add('hidden'); + domOnlyDownload.classList.remove('hidden'); + } else { + domCopyOrDownload.classList.remove('hidden'); + domOnlyDownload.classList.add('hidden'); + } +} + function onChange() { setChannelWeightLabels(domSpace.value); + setDownloadMessage(); if (inputImage == null) return; runThumbnailGenerator(inputImage); } @@ -380,8 +396,13 @@

OS Thumbnail Generator



- Copy the notes to the clipboard or - download the sequence file + +
+ Download the sequence file +