Anonymous ID: cbafe0 Jan. 13, 2019, 6:14 p.m. No.4745263   🗄️.is 🔗kun   >>5316 >>5321

Newfags, here is some code to help out while here. A Blacklist Button to filter images you do not approve of Permanently. Also has a realtime post counter so you know how far we are in the bread. Just add the code to your options user js.

 

// Blacklist Button - Permanently Blacklist Imagesvar 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);/ Display a replies counter overlay in the bottom right corner /$(function(){ $('head').append('<style>#thread_stats_posts_ovl { '+ 'position:fixed;bottom:15px;right:35px;'+ 'font:38px sans-serif;opacity:0.5;color:#f60;}</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();});

Anonymous ID: cbafe0 Jan. 13, 2019, 6:17 p.m. No.4745316   🗄️.is 🔗kun

>>4745263

And here is a little CSS code to make Red Text Faggots disappear. Add to options theme

 

/ Invisible Red Text /span.heading { color: #d6daf0; / Invisible / font-size: 4pt; / Real small, default is 11pt /}