diff --git a/README.md b/README.md index f8902b4..66d4ba4 100644 --- a/README.md +++ b/README.md @@ -25,15 +25,15 @@ Please report any issue you have with those (only for mainstream browsers) Also, use this if you plan to use b4k's archive. - [Install 4chanX (recommended)](https://www.4chan-x.net/builds/4chan-X.user.js) -- Install the correct WebExtension for your Browser ([Firefox](https://git.coom.tech/fuckjannies/lolipiss/raw/branch/%E4%B8%AD%E5%87%BA%E3%81%97/pngextraembedder-0.268.xpi) or [Chrome-based](https://chrome.google.com/webstore/detail/pngextraembedder/bfhpobiikighljcapcfmfganodihbicj)) +- Install the correct WebExtension for your Browser ([Firefox](https://git.coom.tech/fuckjannies/lolipiss/raw/branch/%E4%B8%AD%E5%87%BA%E3%81%97/pngextraembedder-0.269.xpi) or [Chrome-based](https://chrome.google.com/webstore/detail/pngextraembedder/bfhpobiikighljcapcfmfganodihbicj)) For FF users, the extension is signed so you can just drag and drop it on your about:addons tab. Chrom* users can now install directly from the chrome webstore. Known bugs: -- A couple anons reported embeds not loading at all, with no clear fix, I'll update this as workarounds until the cause is found and fixed. - - One reported that he had somehow disabled some permissions and turning them back on fixed the issue. +- JPEG embedding might not work with some very big files (> 1MB). +- PNG GIFs and WebMs got patched :( ### Side loading diff --git a/firefox/dist/main.js b/firefox/dist/main.js index 0b037c3..70d8d3f 100644 --- a/firefox/dist/main.js +++ b/firefox/dist/main.js @@ -51,7 +51,7 @@ var define_BUILD_VERSION_default; var init_define_BUILD_VERSION = __esm({ ""() { - define_BUILD_VERSION_default = [0, 268]; + define_BUILD_VERSION_default = [0, 269]; } }); @@ -18736,7 +18736,7 @@ var injectTrue = async (b, links) => { if (b.size / 20 < links.join(" ").length) throw "Image too small to embed."; - const arr = new Uint8Array(await b.arrayBuffer()); + const arr = new Uint8Array(new Uint8Array(await b.arrayBuffer())); const buff = f5inst.embed(arr, new TextEncoder().encode(links.join(" "))); return import_buffer6.Buffer.from(buff); }; diff --git a/firefox/manifest.json b/firefox/manifest.json index b1ec60a..7ae1314 100644 --- a/firefox/manifest.json +++ b/firefox/manifest.json @@ -7,7 +7,7 @@ }, "name": "PngExtraEmbedder", "description": "Discover embedded files on 4chan and archives!", - "version": "0.268", + "version": "0.269", "icons": { "64": "1449696017588.png" }, diff --git a/firefox_update.json b/firefox_update.json index fa933d3..0551cb3 100644 --- a/firefox_update.json +++ b/firefox_update.json @@ -1 +1 @@ -{"addons":{"{34ac4994-07f2-44d2-8599-682516a6c6a6}":{"updates":[{"version":"0.268","update_link":"https://git.coom.tech/fuckjannies/lolipiss/raw/branch/%E4%B8%AD%E5%87%BA%E3%81%97/pngextraembedder-0.268.xpi"}]}}} \ No newline at end of file +{"addons":{"{34ac4994-07f2-44d2-8599-682516a6c6a6}":{"updates":[{"version":"0.269","update_link":"https://git.coom.tech/fuckjannies/lolipiss/raw/branch/%E4%B8%AD%E5%87%BA%E3%81%97/pngextraembedder-0.269.xpi"}]}}} \ No newline at end of file diff --git a/pngextraembedder-0.249.xpi b/pngextraembedder-0.249.xpi deleted file mode 100644 index 0f00712..0000000 Binary files a/pngextraembedder-0.249.xpi and /dev/null differ diff --git a/pngextraembedder-0.262.xpi b/pngextraembedder-0.262.xpi deleted file mode 100644 index 20f659d..0000000 Binary files a/pngextraembedder-0.262.xpi and /dev/null differ diff --git a/pngextraembedder-0.267.xpi b/pngextraembedder-0.267.xpi deleted file mode 100644 index fe886e8..0000000 Binary files a/pngextraembedder-0.267.xpi and /dev/null differ diff --git a/pngextraembedder-0.268.xpi b/pngextraembedder-0.268.xpi deleted file mode 100644 index 2c9dcb0..0000000 Binary files a/pngextraembedder-0.268.xpi and /dev/null differ diff --git a/pngextraembedder-0.265.xpi b/pngextraembedder-0.269.xpi similarity index 81% rename from pngextraembedder-0.265.xpi rename to pngextraembedder-0.269.xpi index 7ff4b66..c9e9c12 100644 Binary files a/pngextraembedder-0.265.xpi and b/pngextraembedder-0.269.xpi differ diff --git a/src/jpg.ts b/src/jpg.ts index a8417fb..e750cda 100644 --- a/src/jpg.ts +++ b/src/jpg.ts @@ -61,7 +61,7 @@ const injectTrue = async (b: File, links: string[]) => { // TODO: maybe do a lossless crop/embed/concat? if (b.size / 20 < links.join(' ').length) throw "Image too small to embed."; - const arr = new Uint8Array(await b.arrayBuffer()); + const arr = new Uint8Array(new Uint8Array(await b.arrayBuffer())); const buff = f5inst.embed(arr, new TextEncoder().encode(links.join(' '))); return Buffer.from(buff); };