memeller / shrunked

Shrunked Image Resizer add-on for Thunderbird
https://addons.thunderbird.net/addon/shrunked-image-resizer/
11 stars 0 forks source link

inconsistent context-menu behavior #23

Closed r2evans closed 6 months ago

r2evans commented 6 months ago

Possibly related to https://github.com/memeller/shrunked/issues/22, but it works in one mode but not another.

I can take a screenshot, paste into the email, and it asks if I want to resize (or I can right-click and "Resize this image...").

image

From there, the popup correctly shows the current dimensions/file-size, and the file is large enough (both in dims and size) for a resize.

image

After I click on "Okay", the modal disappears and the image/email are unchanged. If I right-click and attempt to resize again, the image dimensions/size are unchanged.

My "Shrunked" settings:

image


Now, if I repaste that image, sometimes it says that it is not recognized:

image

though clicking on the "Resize disabled:" context menu still brings up the resizing modal.

If instead I accept the "Resize this image?" or "Resize these images?" Yes on the bottom, the image is resized as intended.


Console log:

image

Log at timestamp 11:07:23:557 ``` 11:07:23.557 WebExtensions: Unexpected return: Array [ File ] ​ 0: File { lastModified: 1708790843556, size: 12965, type: "image/jpeg", … } ​​ blobImplType: "StreamBlobImpl[StreamBlobImpl[MultipartBlobImpl[MemoryBlobImpl]]]" ​​ lastModified: 1708790843556 ​​ mozFullPath: "" ​​ name: "" ​​ size: 12965 ​​ type: "image/jpeg" ​​ webkitRelativePath: "" ​​ : FilePrototype { name: Getter, lastModified: Getter, webkitRelativePath: Getter, … } ​​​ constructor: function () ​​​ lastModified: ​​​ mozFullPath: ​​​ name: ​​​ webkitRelativePath: ​​​ Symbol(Symbol.toStringTag): "File" ​​​ : function lastModified() ​​​ : function mozFullPath() ​​​ : function name() ​​​ : function webkitRelativePath() ​​​ : BlobPrototype { slice: slice(), stream: stream(), text: text(), … } ​ length: 1 ​ : Array [] shrunked.js:99 ```
Log at timestamp 11:12:43.958 ``` 11:12:43.958 WebExtensions: Unexpected return: Array [ File ] ​ 0: File { lastModified: 1708791163957, size: 11526, type: "image/jpeg", … } ​​ blobImplType: "StreamBlobImpl[StreamBlobImpl[MultipartBlobImpl[MemoryBlobImpl]]]" ​​ lastModified: 1708791163957 ​​ mozFullPath: "" ​​ name: "" ​​ size: 11526 ​​ type: "image/jpeg" ​​ webkitRelativePath: "" ​​ : FilePrototype { name: Getter, lastModified: Getter, webkitRelativePath: Getter, … } ​​​ constructor: function () ​​​ lastModified: ​​​ mozFullPath: ​​​ name: ​​​ webkitRelativePath: ​​​ Symbol(Symbol.toStringTag): "File" ​​​ : function lastModified() ​​​ : function mozFullPath() ​​​ : function name() ​​​ : function webkitRelativePath() ​​​ : BlobPrototype { slice: slice(), stream: stream(), text: text(), … } ​ length: 1 ​ : Array [] shrunked.js:99 ```

Ubuntu-23.10 on Wayland. Betterbird-115.8.0-bb24, Shrunked-5.7.1. The only other extension enabled is Nostalgy++-4.1.4.

If you're not familiar with Betterbird: I understand you may not be looking to explicitly support non-TB. BB is forked from TB, maintained with hours/days of TB's releases, and pushes PRs back to TB (even though TB is woefully behind on many patches in general). In my experience BB has no extension-incompatibility issues with TB. I use other extensions (only one other currently, but others historically), and none of them work in TB and don't work in BB.