Update ImageUtilities.plugin.js

This commit is contained in:
Mirco Wittrien 2022-03-03 18:43:25 +01:00
parent fec9d2ed74
commit a830baef85
1 changed files with 10 additions and 9 deletions

View File

@ -2,7 +2,7 @@
* @name ImageUtilities * @name ImageUtilities
* @author DevilBro * @author DevilBro
* @authorId 278543574059057154 * @authorId 278543574059057154
* @version 4.6.2 * @version 4.6.3
* @description Adds several Utilities for Images/Videos (Gallery, Download, Reverse Search, Zoom, Copy, etc.) * @description Adds several Utilities for Images/Videos (Gallery, Download, Reverse Search, Zoom, Copy, etc.)
* @invite Jx3TjNS * @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien * @donate https://www.paypal.me/MircoWittrien
@ -17,11 +17,12 @@ module.exports = (_ => {
"info": { "info": {
"name": "ImageUtilities", "name": "ImageUtilities",
"author": "DevilBro", "author": "DevilBro",
"version": "4.6.2", "version": "4.6.3",
"description": "Adds several Utilities for Images/Videos (Gallery, Download, Reverse Search, Zoom, Copy, etc.)" "description": "Adds several Utilities for Images/Videos (Gallery, Download, Reverse Search, Zoom, Copy, etc.)"
}, },
"changeLog": { "changeLog": {
"fixed": { "fixed": {
"Open Image": "No longer stops Images from opening when being clicked, when Details Tooltip is enabled",
"Details Tooltip": "Works again" "Details Tooltip": "Works again"
}, },
"improved": { "improved": {
@ -1072,17 +1073,17 @@ module.exports = (_ => {
if (this.settings.general.showOnHover && e.instance.props.original && e.instance.props.src.indexOf("https://media.discordapp.net/attachments") == 0) { if (this.settings.general.showOnHover && e.instance.props.original && e.instance.props.src.indexOf("https://media.discordapp.net/attachments") == 0) {
let attachment = BDFDB.ReactUtils.findValue(e.instance, "attachment", {up: true}); let attachment = BDFDB.ReactUtils.findValue(e.instance, "attachment", {up: true});
if (attachment) { if (attachment) {
e.returnvalue = BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TooltipContainer, { const onMouseEnter = e.returnvalue.props.onMouseEnter;
text: [ e.returnvalue.props.onMouseEnter = BDFDB.TimeUtils.suppress((...args) => {
BDFDB.TooltipUtils.create(args[0].target, [
attachment.filename, attachment.filename,
BDFDB.NumberUtils.formatBytes(attachment.size), BDFDB.NumberUtils.formatBytes(attachment.size),
`${attachment.width}x${attachment.height}px` `${attachment.width}x${attachment.height}px`
].map(l => BDFDB.ReactUtils.createElement("div", {style: {padding: "2px 0"}, children: l})), ].map(l => BDFDB.ReactUtils.createElement("div", {style: {padding: "2px 0"}, children: l})), {
tooltipConfig: {
type: "right", type: "right",
delay: this.settings.amounts.hoverDelay delay: this.settings.amounts.hoverDelay
}, });
children: e.returnvalue return onMouseEnter(...args);
}); });
} }
} }
@ -1654,7 +1655,7 @@ module.exports = (_ => {
default: // English default: // English
return { return {
context_copy: "Copy {{var0}}", context_copy: "Copy {{var0}}",
context_lenssize: "Lens size", context_lenssize: "Lens Size",
context_saveas: "Save {{var0}} as ...", context_saveas: "Save {{var0}} as ...",
context_searchwith: "Search {{var0}} with ...", context_searchwith: "Search {{var0}} with ...",
context_view: "View {{var0}}", context_view: "View {{var0}}",