/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.
Nolan Baker
We have a resident shitposter?
Christopher Williams
Yeah that namefag from endchan that won't fuck off back there
it's missing some )s on the end of lines there, whoops
Luke Jones
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.
Brandon Nelson
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
I'm not done yet, looks like you guys could use support for subject filtering too.
Adrian Richardson
Friendly reminder to /k/'s owner: turn "early 404" on in the board settings and these sliding attempts will get nowhere
Carson Cruz
Piss off back to Reddit you cuck
Delete this
wtf I hate Javascript now
Jaxson Wright
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
Mason Russell
Almost done, just one more thing...
Adrian Miller
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);}
Cooper Cox
Josh pls
Nathan Davis
I can still see the namefag in this thread
Lincoln Hall
Did you do what it says in ?
Henry Sanders
The css part? If so I did that
Alexander Evans
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
Jack Jenkins
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
Mason Ortiz
Nothing in the console btw
Anthony Parker
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
Jayden Morris
No luck with that
David Sullivan
Well shit.
Just to make sure, you do have that name in your filters, right?
Isaiah Barnes
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
Michael Hernandez
It's why I use greasemonkey, and stylish for everything instead of the ones built into Holla Forums.
Jeremiah Evans
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.
Jack Ramirez
Thanks for the help. Script works great
Matthew Ross
bump
Asher Scott
Fuck off Steins;Nigger
Colton Phillips
/k/ is now user only, so he won't post there with his faggot name again.
David Flores
Here isn't though. Thankfully Dashchan (Android) allows me to global filter namefags.