View Single Post
Old 02-19-2017, 03:30 PM  
blackmonsters
Making PHP work
 
blackmonsters's Avatar
 
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 20,766
Quote:
Originally Posted by wocnom View Post

So, lately I noticed that like 1/3 of "Fucking Around & Program Discussion" is spammed with _SO MANY_ Trump threads.
> I don't like it. Don't get me wrong, I just don't care. I wanna read about adult biz stuff.

What could I do? Well, a lot of you surely remember the userscript from Killswitch for blocking user posts on the client side. I am using it sice then.



So I added some more features in version 1.2. to fix our problem:
  • There are another array (hide_titles), where you put keyword for the titles of posts. When the keyword is matched in the title, the thread is removed.
  • There is variable visible. When you set it to TRUE, you can still read the threads/post. They are just moved to the bottom of the site with lower opacity (threads) and black (posts) like i wrote in quote above. When you set it to FALSE, the threads and posts are removed completely.

An example if visible = true:



THE SCRIPT: http://pastebin.com/raw/cB8J7TV1

Installation in firefox:
  • You must have installed addon GreaseMonkey.
  • Copy the code of script from pastebin. Create file with name "gfy.user.js" and save the code to it.
  • Modify the arrays (hide_users, hide_titles).
  • Drag the file a drop it into firefox.
  • Accept, enable and use the script.

johnnyloadproductions made a video of installation the userscript in previous thread:



Feel free to modify the userscript, share it or whatever you want to do with it.
If you have any trouble, just post here. I am using the userscript in firefox. I didn't try it in chrome.

The credits go to: Killswitch, Mr Pheer, CPA-Rush, johnnyloadproductions, wocnom.

I have a nice add-on that I wrote.
It allows you to see that someone was quoted but their quote is turned into the shit that it is.


The code you removed the comments from in the video should be changed to this :


$('div[style^="margin:"]').each(function (post_index, post_value) {
var post_block = $(this);
var post_block_quote = $('div[style^="font-style:italic"]', this);
var post_author = $('strong', this).text();
$(hide_users).each(function (hide_index, hide_user) {
if (post_author === hide_user) {
//post_block.remove();
$(post_block_quote).html("<br><font color=#998877><i>I'm a useless piece of </i></font><font size=6>&#128169</font>");
}
});
}); //replaces quotes of shitty people with a piece of shit.


blackmonsters is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote