From 950b226374bbb7e8fd5461733189daf69064218c Mon Sep 17 00:00:00 2001 From: Marc-Andre Ferland Date: Thu, 3 Nov 2022 02:09:42 -0400 Subject: [PATCH] Moved copy icon css to main.css --- ui/media/css/main.css | 13 +++++++++++++ ui/media/js/dnd.js | 16 ---------------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/ui/media/css/main.css b/ui/media/css/main.css index 9f8bca08..ff9249f4 100644 --- a/ui/media/css/main.css +++ b/ui/media/css/main.css @@ -569,6 +569,19 @@ input::file-selector-button { position: relative; transform: translateY(-13%); } + #copy-image-settings { + cursor: pointer; + padding: 8px; + opacity: 1; + transition: opacity 0.5; +} +.collapsible:not(.active) #copy-image-settings { + display: none; +} +#copy-image-settings.hidden { + opacity: 0; + pointer-events: none; +} .simple-tooltip { border-radius: 3px; diff --git a/ui/media/js/dnd.js b/ui/media/js/dnd.js index 57f05cec..7fcd9c22 100644 --- a/ui/media/js/dnd.js +++ b/ui/media/js/dnd.js @@ -349,22 +349,6 @@ document.addEventListener("dragover", dragOverHandler) // Adds a copy icon if the browser grants permission to write to clipboard. function checkWriteToClipboardPermission (result) { if (result.state == "granted" || result.state == "prompt") { - const style = document.createElement('style'); - style.textContent = ` - #copy-image-settings { - cursor: pointer; - padding: 8px; - opacity: 1; - transition: opacity 0.5; - } - .collapsible:not(.active) #copy-image-settings { - display: none; - } - #copy-image-settings.hidden { - opacity: 0; - pointer-events: none; - }`; - document.head.append(style); const resetSettings = document.getElementById('reset-image-settings') const copyIcon = document.createElement('i') copyIcon.id = 'copy-image-settings'