/k/, here. Your resident shitposter has decided to spam our board with cuck porn because we ignored his ass...

/k/, here. Your resident shitposter has decided to spam our board with cuck porn because we ignored his ass. To make his anger grow, please use this so that he's ignored even more.

var filter = JSON.parse(localStorage.postFilter).generalFilter;var nameFilters = [];for(var i = 0, len = filter.length; i 0) {if(document.querySelector("div[class=threads]")) { var threadUsernames = document.querySelectorAll("img[data-name]"); for (var i = 0, len = threadUsernames.length; i < len; i++) { for(var j = 0, filterlen = nameFilters.length; j < filterlen; j++) { if(nameFilters[j].test(threadUsernames[i].getAttribute("data-name"))) { threadUsernames[i].parentNode.parentNode.parentNode.style.display="none"; // "What namefaggot thread?" } } }} else { var postUsernames = document.querySelectorAll("span[class=name]"); for (var i = 0, len = postUsernames.length; i < len; i++) { var nodeToSuppress = postUsernames[i].parentNode.parentNode.parentNode; if(postUsernames[i].parentNode.nodeName.toLowerCase()=="a") { nodeToSuppress = postUsernames[i].parentNode.parentNode.parentNode.parentNode; } for(var j = 0, filterlen = nameFilters.length; j < filterlen; j++) { if(nameFilters[j].test(nodeToSuppress.innerText)) { if(nodeToSuppress) { nodeToSuppress.style.display="none"; // "What namefaggot?" nodeToSuppress.innerHTML="This faggot's post was suppressed; imagine the butthurt."; if(nodeToSuppress.previousSibling.style != null) {nodeToSuppress.previousSibling.style.display="none";} } } } }}}

Just block by name and refresh page. Now he won't even show up as filtered.

Pic related, your resident shitposter.

We have a resident shitposter?

Yeah that namefag from endchan that won't fuck off back there

pic related, forgot to spoiler.

ew.
var nameFilters = JSON.parse(localStorage.postFilter).generalFilter .filter(x => x.type == 'name') .map(x => new RegExp(x.value.replace(/\s+/,'\\s*'), 'i'));if ( nameFilters.length ) { switch ( window.active_page ) { case 'catalog': Array.from(document.querySelectorAll('.thread-image')) .filter(x => nameFilters.find(f => x.dataSet.name.match(f))) .map(x => x.closest('.mix').classList.add('cancer'); break; default: Array.from(document.querySelectorAll('.post .name')) .filter(x => nameFilters.find(f => x.textContent.match(f))) .map(x => x.closest('.post').classList.add('cancer');} }// .cancer { display: none !important } goes in usercss

Thanks. This is why /k/ doesn't into code.

it's missing some )s on the end of lines there, whoops

Actually scratch that, it's got a bunch of typos. Gonna actually use it myself for a few minutes and then post a version that works.

Okay that was a headache but worth it.

This version:
1. makes the native name and comment text filters work on the catalog
2. supports the built-in regex checkbox too
3. actually works
4. uses mapreduce

var userFilters = JSON.parse(localStorage.postFilter).generalFilter;var regexify = x => new RegExp(x.regex ? x.value : x.value.replace(/\s+/,'\\s*'), 'i');var textFilters = userFilters.filter(x => x.type == 'com').map(regexify);var nameFilters = userFilters.filter(x => x.type == 'name').map(regexify);var hasText = x => textFilters.find(f => x.textContent.match(f));var rm = (selector, functor) => Array.from(document.querySelectorAll(selector)) .filter(x => functor(x)) .map(x => x.closest('.post, .mix').classList.add('cancer'));if ( window.active_page == 'catalog' ) { let hasName = x => x.dataset && nameFilters.find(f => x.dataset.name.match(f)); rm('.thread-image', hasName); rm('.replies', hasText);}else { let hasName = x => nameFilters.find(f => x.textContent.match(f)); rm('.post .name', hasName); rm('.post .body', hasText);}

Namefagging is over

Good work

I'm not done yet, looks like you guys could use support for subject filtering too.

Friendly reminder to /k/'s owner: turn "early 404" on in the board settings and these sliding attempts will get nowhere

Piss off back to Reddit you cuck


Delete this


wtf I hate Javascript now

Seriously, I hope you faggots don't enable proprietary Javascript. This whole false flag followed by this script is to:
1. Let the OP pull off a coup and get ownership of /k/
2. Set the honeypot for you with Javascript

Almost done, just one more thing...

There we go. Now it filters out entire posts as the thread updates.
var userFilters = { name: [], trip: [], com: [], sub: [], board_k: [ /nameFaggotThread(?!.*and so on\.\s*$)/i, ],};JSON.parse(localStorage.postFilter).generalFilter .map(x => userFilters[x.type].push( new RegExp(x.regex ? x.value : x.value.replace(/\s+/,'\\s*'), 'i')) );var getText = x => x.textContent;var rm = (selector, type, functor) => Array.from(document.querySelectorAll(selector)) .filter(x => userFilters[type].some(f => functor(x).match(f))) .map(x => x.closest('.post, .mix').classList.add('cancer'));rm('.post .subject, .mix .subject', 'sub', getText);rm('.post .body, .mix .replies', 'com', getText);switch ( active_page ) { case 'catalog': rm('.mix .thread-image', 'name', x => x.dataset.name); break; case 'thread': rm('.post .trip', 'trip', getText); rm('.post .name', 'name', getText); $(document).on('new_post', (e, x) => { let newid = '#'+x.id; rm(newid+' .trip', 'trip', getText); rm(newid+' .name', 'name', getText); rm(newid+' .body', 'com', getText); if ( userFilters['board_'+board_name] ) { rm(newid, 'board_'+board_name, getText); } }); break;}if ( userFilters['board_'+board_name] ) { rm('.post, .mix', 'board_'+board_name, getText);}

Josh pls

I can still see the namefag in this thread

Did you do what it says in ?

The css part? If so I did that

okay then, right click -> Inspect one of the posts it should've got rid of and post a screenshot of whatever's there. Also anything in the error console, but there shouldn't be

Looks like the cancer class isn't being appended to the class list, if I add it myself the post definitely disappears so my CSS is working

Nothing in the console btw

I don't think Firefox's console shows everything by default.

You can try one thing, I really hope it isn't this but just in case: remove those two trailing commas after "/i" and the "]" on the line below it

No luck with that

Well shit.

Just to make sure, you do have that name in your filters, right?

That's probably what's wrong, my history clears itself constantly. If I make it stop doing that the name will stick in my filters, and it should probably be fixed

It's why I use greasemonkey, and stylish for everything instead of the ones built into Holla Forums.

Oh that might be a problem, yeah. You can work around it by setting things up how you want them, type localStorage.postFilter in the console, then copy and paste that as localStorage.postFilter="{that stuff}" at the top of the script.

Thanks for the help. Script works great

bump

Fuck off Steins;Nigger

/k/ is now user only, so he won't post there with his faggot name again.

Here isn't though. Thankfully Dashchan (Android) allows me to global filter namefags.