Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name RBXSpamTrasher
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description try to take over the world!
- // @author You
- // @match https://www.roblox.com/library/*/*
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- var spamContains = [
- "that means you're qualified",
- "Want ROBUX?",
- "No info or downloads",
- "Instantly receive your ",
- "Just get a code, and redeem here",
- "You're eligible for BUX",
- "Processed Instantly for tons of",
- "Visit the link: ",
- "Go see the link: ",
- "Redeem your BUX now",
- "No details needed! Unlock",
- "Go to the link: ",
- "New rewards site with instant BUX and passes",
- "finish a quick offer to get the option",
- "ROBUX piles coming your way",
- "Unlock ALL Game VIP",
- "rewardbuddy",
- "instantreward"
- ];
- var loadStep = 20;
- Array.from(document.getElementsByClassName("comments-item-template")).forEach(function(element, index, array){
- element.getElementsByTagName("div")[0].style.display = 'none';
- });
- var cln;
- function initializeFakeLoader(){
- Array.from(document.getElementsByClassName("loading-animated")).forEach(function(element, index, array) {
- element.style.display = 'none';
- });
- Array.from(document.getElementsByClassName("loader-template")).forEach(function(element, index, array) {
- cln = element.getElementsByTagName("div")[0].cloneNode(true);
- element.getElementsByTagName("div")[0].style.display = 'none';
- });
- var contain = document.getElementById("AjaxCommentsContainer").getElementsByTagName("div")[1]
- contain.insertBefore(cln, contain.childNodes[6]);
- cln.style.display = '';
- Array.from(document.getElementsByClassName("btn-control-sm rbx-comments-see-more")).forEach(function(element, index, array) {
- element.style.visibility = 'hidden';
- });
- }
- initializeFakeLoader();
- var stillLoading = true;
- var iters = 0;
- var nonSpam = 0;
- Array.from(document.getElementsByClassName("btn-control-sm rbx-comments-see-more")).forEach(function(element, index, array) {
- element.onclick = function(){
- if((!(element.classList.contains("hidden"))) && nonSpam >= loadStep){
- nonSpam = 0;
- iters = 0;
- stillLoading = true;
- initializeFakeLoader();
- }
- };
- });
- setInterval(function() {
- if((!stillLoading) && (cln.parentNode)){
- cln.parentNode.removeChild(cln);
- Array.from(document.getElementsByClassName("loader-template")).forEach(function(element, index, array) {
- element.getElementsByTagName("div")[0].style.display = '';
- });
- Array.from(document.getElementsByClassName("btn-control-sm rbx-comments-see-more")).forEach(function(element, index, array) {
- element.style.visibility = '';
- });
- }
- Array.from(document.getElementsByClassName("btn-control-sm rbx-comments-see-more")).forEach(function(element, index, array) {
- if ((!(element.classList.contains("hidden"))) && nonSpam < loadStep) {
- iters++;
- element.click();
- stillLoading = true
- }else{
- stillLoading = false
- }
- });
- Array.from(document.getElementsByClassName("comment-content list-content")).forEach(function(element, index, array) {
- if(element.alreadyCheck != "true"){
- var isSpam = false;
- spamContains.forEach(function(a, b, c){
- if (element.innerHTML.indexOf(a)>=0){
- element.parentNode.parentNode.style.display = 'none';
- isSpam = true;
- }
- });
- if(element.innerHTML == "text"){
- isSpam = true;
- }
- if (isSpam == false){
- nonSpam++;
- element.parentNode.parentNode.style.display = '';
- }
- element.alreadyCheck = "true";
- }
- });
- }, 600);
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement