DoujinStars
João Dias
João Dias

patreon


How I deal with Forum Spam

I have a forum for my apps where people ask all sorts of questions.

http://forum.joaoapps.com/index.php

The problem is that it has a LOT of spam! It has so much spam that I have decided that I would not automatically approve any post but instead would look through all the posts manually and approve them one by one.

The problem is that the Forum software (XenForo) doesn't have a way of mass-marking stuff as spam.

So I have to go to each spammer's individual profile, mark them as spam, and then move on to the next one... That usually requires a lot of clicks and time... 

Thus, being the lazy person I am, I created javascriplets that do all the work for me and conveniently placed them on my bookmarks bar.

The video above is showing those in action :D Much easier to get rid of spam now!


How I deal with Forum Spam

Comments

Thx for the interesting detailed information. :) Keep up the good work.

jonas.app

Yep, they do exactly that :) Here's what the first one does (Queue Spam): Array.prototype.slice.call(document.querySelectorAll(".username")).map(x=>x.href).filter((v, i, a) => a.indexOf(v) === i).forEach(url=>url?window.open(url,'_blank'):null) And here's the second (Spam Single): document.querySelector(".deleteSpam").click();setTimeout(()=>{ try{document.querySelector(".SpamCleaner .button.primary").click();}catch(error){} setTimeout(()=>{document.querySelectorAll(".userInfo a.username").forEach(n=>{ if(!n.querySelector("span")){ console.log(n);n.click(); } }); setTimeout(window.close,100);} ,500); },500); Basically they look for the correct items and click them! Let me know if you need any info on the Javascript itself!

João Dias

Can you expain the javascriplets in more detail? :) Are they just searching dom elements and clicking buttons? In general it would be easier to follow with some audio explanation.

jonas.app


More Creators