4chan archive thread image downloader for general use across many foolfuuka based imageboards. Downloads all images individually in a thread with original filenames (by default). Optional thread API button, for development purposes.
Script should also work with webm files. Script is not compatible with Greasemonkey due to lack of shared API permissions; best used with Violentmonkey. Also, sort of a disclaimer, but obviously this script will not download any files from links in a post's content other than the media that is or is not included with the post. Foolfuuka based sites were taken from this list. If you would like a foolfuuka based site that is not in the
@match section of the metadata block, please create a discussion on the script or email me here: firstname.lastname@example.org. Alternatively, you can also add your foolfuuka based site of choice not on the list in the metadata block in the following format
*://site.com/*/thread/*. I made the
@match only https for security reasons, but you can change that to a star (*) for all protocols if you prefer that.
User preferences can be altered by changing the boolean values at the top of the script.
var api_button_enabled to
archive_filenames determines if you want to save the filename for the media that is saved under the same filename across the archive or the 4chan timestamp filename.
var confirm_download is
true by default; disabling it will make it only require one click to download all the images in a thread, recommended only if confirming downloads errors such as being stuck on "processing".
var download_limit. The default is 3000 milliseconds in delay from one download to the next to prevent overwhelming downloads. Setting this to 0 will mean effectively no delay in downloading.
var named_poster_media_download_only to true (and false otherwise).
named_poster_tag_in_filename is optional and will only work if you have
var named_poster_media_download_only set to
true as well. If both are enabled, only named posters images will download and the named poster's name will be in the front of the file name (ex. NameHere_-_RestOfFileName.png)
This script is based off of my previous script, 4plebs Thread Image Downloader. Please note that if you choose to use both of these scripts, it will work better functionally if you edit the code and remove line 4,
// @match https://archive.4plebs.org/*/thread/* in this script or choose to disable the other one, as to avoid duplicate buttons appearing. To avoid that confusion, the other script will be unlisted but still available upon this script being published.