Browse Source

Fix deserialization to fix catbox upload

pull/46/head
coomdev 2 years ago
parent
commit
cc8fd556e2
  1. 1
      .gitignore
  2. 9
      README.md
  3. 2
      chrome/manifest.json
  4. 2
      firefox/manifest.json
  5. 2
      firefox_update.json
  6. BIN
      pngextraembedder-0.228-an+fx.xpi
  7. 2
      src/background.ts
  8. 2
      src/main.ts

1
.gitignore

@ -38,3 +38,4 @@ firefox/1449696017588.png
rev/index.html
rev/out.png
1641737123922.png
1449696017588-128.png

9
README.md

@ -25,12 +25,19 @@ 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/coomdev/PEE/raw/branch/%E4%B8%AD%E5%87%BA%E3%81%97/pngextraembedder-0.227-an+fx.xpi) or [Chrome-based](https://chrome.google.com/webstore/detail/pngextraembedder/bfhpobiikighljcapcfmfganodihbicj))
- Install the correct WebExtension for your Browser ([Firefox](https://git.coom.tech/coomdev/PEE/raw/branch/%E4%B8%AD%E5%87%BA%E3%81%97/pngextraembedder-0.228-an+fx.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:
- Catbox upload is broken on the published chrome version, so switch to another host in your options (zz.ht)
- 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.
If none of the above works for you, switch back to the userscript version.
How to Build
============

2
chrome/manifest.json

@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "PngExtraEmbedder",
"description": "Discover embedded files on 4chan and archives!",
"version": "0.222",
"version": "0.228",
"icons": {
"64": "1449696017588.png"
},

2
firefox/manifest.json

@ -7,7 +7,7 @@
},
"name": "PngExtraEmbedder",
"description": "Discover embedded files on 4chan and archives!",
"version": "0.227",
"version": "0.228",
"icons": {
"64": "1449696017588.png"
},

2
firefox_update.json

@ -1 +1 @@
{"addons":{"{34ac4994-07f2-44d2-8599-682516a6c6a6}":{"updates":[{"version":"0.227","update_link":"https://github.com/coomdev/pngextraembedder/raw/branch/%E4%B8%AD%E5%87%BA%E3%81%97/pee-firefox.zip"}]}}}
{"addons":{"{34ac4994-07f2-44d2-8599-682516a6c6a6}":{"updates":[{"version":"0.228","update_link":"https://github.com/coomdev/pngextraembedder/raw/branch/%E4%B8%AD%E5%87%BA%E3%81%97/pee-firefox.zip"}]}}}

BIN
pngextraembedder-0.227-an+fx.xpi → pngextraembedder-0.228-an+fx.xpi

Binary file not shown.

2
src/background.ts

@ -55,6 +55,8 @@ if (manifest == 2)
}, filts, ['blocking', 'responseHeaders', ...(execution_mode == "chrome_api" ? ['extraHeaders' as 'blocking'] : [])]);
async function deserialize(src: any): Promise<any> {
if (typeof src != "object")
return src;
switch (src.cls) {
case 'FormData': {
const ret = new FormData();

2
src/main.ts

@ -194,7 +194,7 @@ const processPost = async (post: HTMLDivElement) => {
};
const versionCheck = async () => {
const txt = (await (await ifetch("https://github.com/coomdev/pngextraembedder/raw/branch/%e4%b8%ad%e5%87%ba%e3%81%97/main.meta.js")).text());
const txt = (await (await ifetch("https://raw.githubusercontent.com/coomdev/pngextraembedder/main/main.meta.js")).text());
const [lmajor, lminor] = txt.split('\n')
.filter(e => e.includes("// @version"))[0].match(/.*version\s+(.*)/)![1].split('.')
.map(e => +e);

Loading…
Cancel
Save