>>152189
https://gist.github.com/sdstpanda/fe951dd45b49cc936f4f1f231df99e69
Made the first version of per-general gacha thumbs javascript. Put it on a gist for now so we can track changes.
Usage is simple, all you have to do is to edit the object at the top and add new rows.
It detects the general /tag/ (or any text really) from the subject of the OP.
You can test the code in the console. For testing /gig/ is this
>>98219 thumb, /zzz/ is
>>98178 thumb, /gfg/ is
>>99518 thumb and /gacha/ is OP's image.
It doesn't apply on catalog, threads without a subject or that doesn't contain a word in the top GENERAL_THUMBS object. In those pages board's default custom thumbnail will apply.
Currently the script doesn't cost any performance.
I would like to also add a per-post gacha system
as this is the gacha board after all . As I mentioned here
>>107711 we can use the post's ID and the image hash (from the url).
One problem with using image hash is people can write a script to edit an image pixel by pixel until they get an image that contains 777 in its sha256 hash.
Anyways if the logic is simple it can be done with CSS for no performance cost.
- We can easily do post id contains "77" -> use SR image; post id contains 777 -> use SSR spoiler image
- We can easily do post gets a dub (ends with 00 11 ... 99) -> SR image, gets trips -> SSR spoiler image
These would override the "general specific thumbs" applied above.
For any other more complicated logic (post contains 3x 7's) we would use javascript to watch each post as they appear in the thread and act accordingly.
(if there are any other devs please point out any problems or improvements)