Anonymous ID: 2d9010 Dec. 21, 2020, 10:07 a.m. No.12118644   🗄️.is 🔗kun   >>8667

>>12118610

You could Blacklist the images using javascipt. Add to Options User JS

 

// User Settings

var imageBlacklist = [] ;

function loadImageBlacklist() { JSON.parse(localStorage.imageBlacklist || "[]").forEach(addToImageBlaclist); }

function saveImageBlacklist() { localStorage.imageBlacklist = JSON.stringify(imageBlacklist); }

function addToImageBlaclist(md5) { if (md5 && -1 === imageBlacklist.indexOf(md5)) imageBlacklist.push(md5); }

function blacklistPostImages(post) { $(post).find('img.post-image').each(function (i, el) { var md5 = el.getAttribute('data-md5'); addToImageBlaclist(md5); el.remove(); }); }

function removeBlacklistedImages() { var removed = 0; $('img.post-image').each(function (i, el) { if (-1 !== imageBlacklist.indexOf(el.getAttribute('data-md5'))) { el.remove(); removed += 1; } }); return removed; }

function onNopeClicked(event) { event.preventDefault(); event.stopPropagation(); loadImageBlacklist(); var post = $(event.target).closest('.post'); blacklistPostImages(post); removeBlacklistedImages(); saveImageBlacklist(); }

function addNopeButtons() { $('.post').each(function(i, post) { if ($(post).find('.nope').length === 0) { $(post).prepend("<input type='button' class='nope' onClick='onNopeClicked(event)' value='Blacklist'></input>"); } }) }

 

setInterval(function () { loadImageBlacklist(); removeBlacklistedImages(); addNopeButtons(); }, 500);

Anonymous ID: 2d9010 Dec. 21, 2020, 10:17 a.m. No.12118744   🗄️.is 🔗kun   >>8753 >>8808

>>12118698

Right.. understood anon. As with any code, if you don't understand it you should best stay clear. And I posted it kek. But JS is useful too. For example I like a realtime post counter beside the quick reply box.

 

/ Display a replies counter overlay in the top right corner /

$(function(){

$('head').append('<style>#thread_stats_posts_ovl { '+

'position:fixed;top:40px;right:25px;'+

'font:38px sans-serif;color:#9988ee;}</style>');

$('body').append('<div id="thread_stats_posts_ovl"/>');

function copyStats() { $('#thread_stats_posts_ovl').

text($('#thread_stats_posts').text());}

$(document).on('new_post',copyStats); copyStats();});