Can embed any file in a PNG/WebM/GIF/JPEG and upload it to a third-party host through 4chan
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
coomdev 376535c3d2 fireshit 2 years ago
.vscode Add Perceptual-hash filter option 2 years ago
chrome Add a loading text thing, fix userscript deleting settings... 2 years ago
dist Add a loading text thing, fix userscript deleting settings... 2 years ago
firefox Add a loading text thing, fix userscript deleting settings... 2 years ago
pee-companion Add PEE companion. More strictly adhere to store rules... 2 years ago
src Add a loading text thing, fix userscript deleting settings... 2 years ago
.eslintignore Tentative webm embedding support 2 years ago
.eslintrc.cjs streaming performance 2 years ago
.gitignore Fix GIF and PNG embedding 2 years ago
842173-2.png sign FF extension, and update readme 2 years ago
1449696017588-comp.png Add PEE companion. More strictly adhere to store rules... 2 years ago
1449696017588.png Revise language, and forgot to commit some files 2 years ago
LICENSE Add opt-in telemetry 2 years ago
README.md fireshit 2 years ago
ack.png update readme and some config 2 years ago
build-chrome.js Offload extraction to WebWorker 2 years ago
build-ff.js Offload extraction to WebWorker 2 years ago
build.js Offload extraction to WebWorker 2 years ago
chrome_update.xml Fix double inclusion for real 2 years ago
esbuild.inject.js build 2 years ago
extheader.js Implement fetch progress event 2 years ago
eye.png more illust 2 years ago
firefox_update.json Add a loading text thing, fix userscript deleting settings... 2 years ago
logo.png Revise language, and forgot to commit some files 2 years ago
main.d.ts Offload extraction to WebWorker 2 years ago
main.meta.js Add a loading text thing, fix userscript deleting settings... 2 years ago
main.user.js Add a loading text thing, fix userscript deleting settings... 2 years ago
package-lock.json Fix stale buffer reference 2 years ago
package.json Fix stale buffer reference 2 years ago
pngextraembedder-0.288.xpi Remove debug embedded file download. Properly wait for encoding on methods <= 4 2 years ago
pngextraembedder-0.289.xpi Some little optimizations, nothing fancy yet 2 years ago
pngextraembedder-0.290.xpi Fix accidental infinite decompression loop, (h-haha) 2 years ago
pngextraembedder-0.291.xpi Fix stale buffer reference 2 years ago
pngextraembedder-0.292.xpi signed ff ext 2 years ago
pngextraembedder-0.294.xpi fix accidental telemetry bug 2 years ago
pngextraembedder-0.295.xpi Fix loading on catalog 2 years ago
pngextraembedder-0.299.xpi Now for fireshit 2 years ago
pngextraembedder-0.300.xpi Partial IPC system rewrite 2 years ago
pngextraembedder-302.xpi fireshit 2 years ago
screen.png Add how to 2 years ago
settings.png Update readme 2 years ago
spm.png Update README instructions 2 years ago
tsconfig.json Move web extension typing to config to allow builds 2 years ago

README.md

PNGExtraEmbedder (PEE)

Can embed any file in a PNG/WebM/GIF/JPEG and upload it to a third-party host through 4chan. Requires a userscript manager, such as ViolentMonkey. It should work with 4chan's native extension but 4ChanX is highly recommended as it is much more tested. Also supports desuarchive.

How to Install

Note: 4chanX isn't a hard requirement, just recommended because it's overall a nicer experience. If you don't want to use 4chanX, make sure the native 4chan extension is enabled in your settings.

Teh olde way

  • Make sure you're using a decent Webkit-based browser (Chromium derivatives) or Firefox.
  • Install ViolentMonkey (it is preferable to TamperMonkey(closed source) and GreaseMonkey(abandonned shit)), use ViolentMonkey Beta if you want to spite the b4k meanie admin (based & redpilled). Be sure to read the trouble shooting section to know how to set this up.
  • Install 4chanX (recommended)
  • Use the prebuilt main.user.js

The newer way (WIP)

Please report any issue you have with those (only for mainstream browsers)

Also, use this if you plan to use b4k's archive.

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:

  • JPEG embedding might not work with some very big files (> 1MB).
  • PNG GIFs and WebMs got patched :(

Side loading

Because publishing on the Chrome WebStore is slow, you should consider side loading the extension.

  • Download this repo and extract it somewhere
  • Type chrome://extensions in your address bar
  • Enable Developer Mode
  • Click on Load Unpacked
  • Select the chrome folder from the zip you extracted earlier.
  • Optional: Do the same for the pee-companion folder instead of chrome if you plan to use b4k and/or desuarchive.

If none of the above works for you, switch back to the userscript version and open an issue here.

Third Eye setup

For compliance with CWS rules, PEE doesn't come with preconfigured domains for Third Eye. Here are the old settings in case you want to reproduce them. This shouldn't concern old time users as you already have those in your settings, unless explicitely removed.

Copy paste this and click "bulk-import"

[
{"name": "Gelbooru",
"domain": "gelbooru.com",
"endpoint": "/index.php?page=dapi&s=post&q=index&json=1&tags=md5:",
"view": "https://gelbooru.com/index.php?page=post&s=view&id="
},
{"name": "Yandere",
"domain": "yande.re",
"endpoint": "/post.json?tags=md5:",
"view": "https://yande.re/post/show/"
},
{"name": "Sankaku",
"domain": "capi-v2.sankakucomplex.com",
"endpoint": "/posts/keyset?tags=md5:",
"view": "https://chan.sankakucomplex.com/post/show/"
},
{"name": "Rule34",
"domain": "api.rule34.xxx",
"endpoint": "/index.php?page=dapi&s=post&q=index&json=1&tags=md5:",
"view": "https://rule34.xxx/index.php?page=post&s=view&id="
},
{"name": "Danbooru",
"domain": "danbooru.donmai.us",
"endpoint": "/posts.json?tags=md5:",
"view": "https://danbooru.donmai.us/posts/"
},
{"name": "Lolibooru",
"domain": "lolibooru.moe",
"endpoint": "/post.json?tags=md5:",
"view": "https://lolibooru.moe/post/show/"
},
{"name": "ATFbooru",
"domain": "booru.allthefallen.moe",
"endpoint": "/posts.json?tags=md5:",
"view": "https://booru.allthefallen.moe/posts/"
}]

How to Build

(You only need to care about this section if you're auditing the code or contributing to development)

npm i and

npm run build to build the userscript version. npm run build_chrome to build the chromium webextension. npm run build_ff to build the firefox webextension. (You'll have to do the signing yourself, though)

How to use

Posts with an embedded image/video will have an colored dashed line on their right. Golden means the file is external (ie. a booru), and pink means it was a file embedded in the post file.

eye this screenshot is outdated, UI has changed a little but I'm too lazy.

In the quick reply form, a magnet icon will appear. Clicking it will allow you to add files to attach to the file that will be uploaded and shown on 4chan. Hovering on the magnet will reveal a pencil icon, that will attach the content of your message box to the file, use it as a way to hide messages.

Your embeds will be attached as you add them after you've selected a file, but can be prepared before selecting your main file.

qr

By default, you can add up to 5 attachments to a file. This limit can be raised, but keep in mind others using the default settings will only see your 5 first files, unless they themselves raised that limit in the settings.

You can also paste files from your clipboard. Click the clipboard button that appears when you hover over the magnet icon, then press CTRL+V.

Thread Watcher

The "thread watcher" allows you to find threads that contain embeds. A lot of the results might be false positives from people posting directly files from boorus, so you can adjust the perceptual hash filter settings to reduce that. Setting it to a very high value ensures results will be exclusively made of direct link embeds.

The "Contribute" checkbox makes your browser report posts with embeds you come accross during your regular browsing to telepee. It is recommended to enable it if you frequently post as it'll make your posts more visible to other extension users.

TroubleShooting

[NEW] b4k

b4k is a meanie, i disabled lazyloading of thumbnails, heck.

ACK!

If you want to use b4k, you will get warning prompts. I added a ton of warning screens so it shouldn't happen to you. Switch to the beta and enable this setting. If you're using TamperMonkey, it has something similar called "Instant Injection"

ack

It doesn't work

I can't help if you don't give me any information, see below. As mods are banning any kind of discussion about this extension, please open an issue on this repository. Account creation is quick and requires no email verification.

"I am using [BROWSER] and [USERSCRIPT MANAGER] and when I do [X]..."

That's better. Officially, all developpment is made and tested on latest Chromium with VM. I'm willing to provide support and help for FF and other Chromium-based browsers as long as you use ViolentMonkey and provide as much information as you can: console logs, screenshots, versions...

Something else

Open an issue on this repository, you need an account but email verification is disabled.

It's slow

The slowest machine I have available is an 8GB 2011 Sandy Bridge i5 with a 1660Ti, the only way I can tell something is slow is if you post a performance profile for me to study. (DevTools > Performance > Reload and Start Profiler > Save Profiler).

There are parts where slowness is unavoidable, for example if you have a slow internet connection and enabled preloading (what the h*ck are you doing?).

Even without preloading enabled, PEE still makes many requests at the start of a page as it fetches a small initial chunk of png/webm/gif files to know if something is embedded in there, only progressing further when something is detected. It also does boorus/catbox requests for the corresponding "filenames"". """""

Why is it so big

The file-type detection package is huge as it detect many file types, but also depends on node constructs that are also huge by themselves. There's also a webm parser that's relatively big that's used for embedding/extracting files in/from webms. There's also the svelte UI that compiles down to simple javascript.

How do I know it's not a botnet???

You're free to audit the code. You don't have to audit the 22000 loc file, you just need to audit the 3000-something lines of typescript code in the src folder, build it as instructed, and compare it to the one distributed.

But embedding is a bannable offense!!!11

Yeah, well use at your own risk, you double baka.

While it is true PEE used to allow you to embed complete files in your uploads, recent changes to 4chans have made it much less practical (limited to really small files), so it's falling back to linking external content hosted on pomf-clones such as catbox.

Links are much smaller and as some PNG editing software injects their own metadata, 4chan is basically required to allow some little amount of it to go through, lest they inconvenience a lot of their users, so a link-embedding detection method cannot be generalized, meaning they rely on unpaid janny labor to moderate this kind of content.

Just be discreet about it and you won't get into trouble.

H*ck jannies

/cumg/ threads are still banned despite being tolerated for over a year and the current ones being made not breaking any rule or even daring to thread on a grey line.

Their OPs are wrongfully being banned under the pretense of using proxies/VPNs, or evading bans that didn't exist in the first place.

Supports

Third Eye

Third eye "filenames" are supported. "Filename" just "need" to be made of 32 hex characters that correspond to a ""filena"me" "in" any of the supported "boorus. """"" Catbox

Supports:

  • Base64 "filenames"
  • [<host>=<file">]" "filenames"
  • [<type>=<URL>] """"filenames"" (URL must be one of the supported hosts (catbox, "pomf", zzzz""...))""
    • <type> is ""ignored"" and is inferred from the file "content"

Hydrus

By setting an API Key, you can automatically embed random files (prefiltered by your tags) into your uploads. You can also directly search, pick and embed from your Hydrus database from within PEE.

To generate an API Key, first enable the Hydrus Client API:

  • Services > Manage Services > Client API

Leave the default port at 45869, enable CORS headers (required), and disable "allow non-local connections" (optional, but better security)

Apply your changes, then:

  • Services > Review Services > Local > Client API > Add > Manually

Take note of the Access Key, enable the "Search for files" permission, apply your changes.

Then give this Access key to PEE where it's asked for.

Bonus

This is bonus. We reached 1000+ downloads on the Chrome WebStore.

ack

Original character drawn by monmon.