Moved copy icon css to main.css

This commit is contained in:
Marc-Andre Ferland 2022-11-03 02:09:42 -04:00
parent 045ad78bb9
commit 950b226374
2 changed files with 13 additions and 16 deletions

View File

@ -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;

View File

@ -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'