Anonymous ID: 5354b4 Jan. 19, 2024, 5:06 a.m. No.20266663   ๐Ÿ—„๏ธ.is ๐Ÿ”—kun

>>20266645

Add to user JS:

//IMAGE BLACKLIST CODING

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='Nope'></input>"); } }) }

 

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

 

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

$(function(){

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

'position:fixed;top:35px;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();});

 

// User Settings

var anonsw = {

qflair: , //'' Examples: REAL, &rarr;

qcolor: '#99d6ff',

youcolor: '#F3D74D',

scrollcolor: 'rgba(153, 153, 153, 0.6)',

scrollbackcolor: '#333',

scrolltime: 400, // ms

updateDelay: 200, // ms

sidenavWidth: 30, // px

 

floodEnabled: true,

floodThreshold: 15, // min # posts before beginning fade

floodVanish: 25, // max # posts before completed fade/hide

floodBehavior: 'fade', // hide, fade

fadenametripregex: /^(Anon(ymous)?-.|.-!!Hs1Jq13jV6)$/i,

fadenametripfloodvalue: -1, // Effective post count for fading, or -1 for auto of floodThreshold+post count

strikeThroughNameFags: true,

 

rateHistoryLen: 50, // Data points on chart

rateAvgLen: 10 // Number of data points to average for instantaneous rate

);