diff --git a/src/equicordplugins/imagePreview/index.ts b/src/equicordplugins/imagePreview/index.ts index 4f77ab6b..486eb737 100644 --- a/src/equicordplugins/imagePreview/index.ts +++ b/src/equicordplugins/imagePreview/index.ts @@ -263,8 +263,10 @@ function loadImagePreview(url: string, sticker: boolean) { fileSize.appendChild(showingSize); } - preview.appendChild(fileName); - preview.appendChild(fileInfo); + if (settings.store.fileInformation) { + preview.appendChild(fileName); + preview.appendChild(fileInfo); + } }); if (loadingSpinner) loadingSpinner.remove(); @@ -287,7 +289,7 @@ function loadImagePreview(url: string, sticker: boolean) { } }); - currentPreview.addEventListener("mouseout", () => { + currentPreviewFile.addEventListener("mouseout", () => { if (currentPreview && !isCtrlHeld && shouldKeepPreviewOpen) { deleteCurrentPreview(); shouldKeepPreviewOpen = false; diff --git a/src/equicordplugins/imagePreview/settings.ts b/src/equicordplugins/imagePreview/settings.ts index d17c1ac0..46b865bb 100644 --- a/src/equicordplugins/imagePreview/settings.ts +++ b/src/equicordplugins/imagePreview/settings.ts @@ -43,6 +43,11 @@ const settings = definePluginSettings({ description: "Fixes the image preview to the initial point of hover", default: false }, + fileInformation: { + type: OptionType.BOOLEAN, + description: "Show file information on hover", + default: true + }, hoverDelay: { type: OptionType.SLIDER, description: "Delay in seconds before the image preview appears", diff --git a/src/equicordplugins/imagePreview/styles.css b/src/equicordplugins/imagePreview/styles.css index d513ec0a..4167d0a3 100644 --- a/src/equicordplugins/imagePreview/styles.css +++ b/src/equicordplugins/imagePreview/styles.css @@ -107,4 +107,4 @@ max-height: 90vh; object-fit: contain; display: none; -} \ No newline at end of file +}