Browse Source

fix some jpeg embedding issues with FF+4chanX

pull/46/head
coomdev 2 years ago
parent
commit
87d38ef800
  1. 6
      README.md
  2. 4
      firefox/dist/main.js
  3. 2
      firefox/manifest.json
  4. 2
      firefox_update.json
  5. BIN
      pngextraembedder-0.249.xpi
  6. BIN
      pngextraembedder-0.262.xpi
  7. BIN
      pngextraembedder-0.267.xpi
  8. BIN
      pngextraembedder-0.268.xpi
  9. BIN
      pngextraembedder-0.269.xpi
  10. 2
      src/jpg.ts

6
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

4
firefox/dist/main.js

@ -51,7 +51,7 @@
var define_BUILD_VERSION_default;
var init_define_BUILD_VERSION = __esm({
"<define:BUILD_VERSION>"() {
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);
};

2
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"
},

2
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"}]}}}
{"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"}]}}}

BIN
pngextraembedder-0.249.xpi

Binary file not shown.

BIN
pngextraembedder-0.262.xpi

Binary file not shown.

BIN
pngextraembedder-0.267.xpi

Binary file not shown.

BIN
pngextraembedder-0.268.xpi

Binary file not shown.

BIN
pngextraembedder-0.265.xpi → pngextraembedder-0.269.xpi

Binary file not shown.

2
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);
};

Loading…
Cancel
Save