Anonymous ID: 23a115 Sept. 26, 2025, 10:46 a.m. No.23658137   🗄️.is 🔗kun   >>8146 >>8154 >>8201 >>8225 >>8260 >>8274

Sharing my custom "COMFY JAVASCRIPT" for anyone interested.Filters namefags, ID:000000, exact duplicate posts, posts longer than one screen (laptop), anons who have 12 posts in a bread.

 

If you want to make your own custom filter, just tell Grok or Copilot what you want and they'll spit out a script in seconds. If you want changes after you run it, just tell your A.I. what you want to change and you'll get a fresh updated script.

 

(function() {

const posts = document.querySelectorAll('.post');

const idMap = {};

const postHashes = new Set();

const MAX_POST_HEIGHT = 1000; // ~1 screen page in pixels

 

function hashContent(content) {

return content.replace(/s+/g, '').toLowerCase();

}

 

function isLikelyEnglish(text) {

const sample = text.slice(0, 500).replace(/[^a-zA-Zs]/g, '');

const words = sample.split(/s+/);

const englishRatio = words.filter(w =/^[a-zA-Z]+$/.test(w)).length / words.length;

return englishRatio 0.7;

}

 

// First pass: collect posts by ID

posts.forEach(post ={

const idElem = post.querySelector('.posteruid');

const idMatch = idElem?.textContent.match(/ID:s*([A-Fa-f0-9]+)/);

const id = idMatch ? idMatch[1] : null;

if (id) {

idMap[id] = (idMap[id] || []);

idMap[id].push(post);

}

});

 

// Add post count badge next to each ID

Object.entries(idMap).forEach(([id, postList]) ={

postList.forEach(post ={

const idElem = post.querySelector('.posteruid');

if (idElem && !idElem.querySelector('.post-count')) {

const badge = document.createElement('span');

badge.textContent = (${postList.length});

badge.className = 'post-count';

badge.style.color = '#888';

badge.style.fontSize = 'smaller';

idElem.appendChild(badge);

}

});

});

 

// Second pass: apply filters

posts.forEach(post ={

const nameElem = post.querySelector('.name');

const idElem = post.querySelector('.posteruid');

const body = post.querySelector('.body')?.textContent.trim() || '';

const postHeight = post.offsetHeight;

 

const name = nameElem?.textContent.trim();

const idMatch = idElem?.textContent.match(/ID:s*([A-Fa-f0-9]+)/);

const id = idMatch ? idMatch[1] : null;

 

// Filter 1: Name is not 'Anonymous'

if (name && name.toLowerCase() !== 'anonymous') {

post.style.display = 'none';

return;

}

 

// Filter 2: ID is all zeroes

if (id && /^0{6}$/i.test(id)) {

post.style.display = 'none';

return;

}

 

// Filter 3: ID has more than 12 posts — hide all of them

if (id && idMap[id].length 12) {

idMap[id].forEach(p =p.style.display = 'none');

return;

}

 

// Filter 4: Exact duplicate post content

const hash = hashContent(body);

if (postHashes.has(hash)) {

post.style.display = 'none';

return;

} else {

postHashes.add(hash);

}

 

// Filter 5: Post is visually too long

if (postHeight MAX_POST_HEIGHT) {

post.style.display = 'none';

return;

}

 

// Filter 6: Post is not in English

if (!isLikelyEnglish(body)) {

post.style.display = 'none';

return;

}

});

 

console.log('8kun filter applied — layout preserved, post counts visible.');

})();

Anonymous ID: 23a115 Sept. 26, 2025, 11 a.m. No.23658191   🗄️.is 🔗kun   >>8202 >>8226

try this:

 

(function() {

const posts = document.querySelectorAll('.post');

const idMap = {};

const postHashes = new Set();

const MAX_POST_HEIGHT = 1000;

const ZERO_ID = '000000';

 

function hashContent(content) {

return content.replace(/s+/g, '').toLowerCase();

}

 

function isLikelyEnglish(text) {

const sample = text.slice(0, 500).replace(/[^a-zA-Zs]/g, '');

const words = sample.split(/s+/);

const englishRatio = words.filter(w =/^[a-zA-Z]+$/.test(w)).length / words.length;

return englishRatio 0.7;

}

 

// First pass: collect posts by ID

posts.forEach(post ={

const idElem = post.querySelector('.posteruid');

const idMatch = idElem?.textContent.match(/ID:s*([A-Fa-f0-9]+)/);

const id = idMatch ? idMatch[1] : null;

if (id) {

idMap[id] = (idMap[id] || []);

idMap[id].push(post);

}

});

 

// Add post count badge next to each ID

Object.entries(idMap).forEach(([id, postList]) ={

postList.forEach(post ={

const idElem = post.querySelector('.posteruid');

if (idElem && !idElem.querySelector('.post-count')) {

const badge = document.createElement('span');

badge.textContent = (${postList.length});

badge.className = 'post-count';

badge.style.color = '#888';

badge.style.fontSize = 'smaller';

idElem.appendChild(badge);

}

});

});

 

// Second pass: apply filters

posts.forEach(post ={

const nameElem = post.querySelector('.name');

const idElem = post.querySelector('.posteruid');

const body = post.querySelector('.body')?.textContent.trim() || '';

const postHeight = post.offsetHeight;

 

const name = nameElem?.textContent.trim();

const idMatch = idElem?.textContent.match(/ID:s*([A-Fa-f0-9]+)/);

const id = idMatch ? idMatch[1] : null;

 

// Filter 1: Hide all but first post from ID:000000

if (id && id.toLowerCase() === ZERO_ID && idMap[id].indexOf(post) 0) {

post.style.display = 'none';

return;

}

 

// Filter 2: ID has more than 12 posts — hide all

if (id && idMap[id].length 12) {

idMap[id].forEach(p =p.style.display = 'none');

return;

}

 

// Filter 3: Exact duplicate post content

const hash = hashContent(body);

if (postHashes.has(hash)) {

post.style.display = 'none';

return;

} else {

postHashes.add(hash);

}

 

// Filter 4: Post is visually too long

if (postHeight MAX_POST_HEIGHT) {

post.style.display = 'none';

return;

}

 

// Filter 5: Post is not in English

if (!isLikelyEnglish(body)) {

post.style.display = 'none';

return;

}

 

// Micro-size logic

const isSinglePostID = id && idMap[id].length === 1;

const isNonAnon = name && name.toLowerCase() !== 'anonymous';

 

if (isSinglePostID || isNonAnon) {

post.style.transform = 'scale(0.1)';

post.style.transformOrigin = 'top left';

post.style.transition = 'transform 0.2s ease';

post.style.opacity = '0.5';

post.addEventListener('mouseenter', () ={

post.style.transform = 'scale(1)';

post.style.opacity = '1';

});

post.addEventListener('mouseleave', () ={

post.style.transform = 'scale(0.1)';

post.style.opacity = '0.5';

});

}

});

 

console.log('8kun filter applied with micro-sizing and ID:000000 cap.');

})();