User Controls
Greasemonkey Script for Blocking Posts Based on Various Conditions
-
2019-03-02 at 9:37 PM UTCHey, OP is discussing it, he's equally culpable.
-
2019-03-07 at 12:20 AM UTCHere's a version that simply looks for the substring "infinity" in the username (in case you would rather block on that basis than to block based on registration date:
if (window.location.hostname === 'niggasin.space') {
var posts = document.getElementsByClassName('post');
for (var i = 0; i < posts.length; i++) {
var post = posts[i];
var user = post.getElementsByClassName('user-block')[0].getElementsByTagName('a')[0];
var user_id = parseInt(user.href.split("/").slice(-1)[0]);
var user_name = user.innerText;
if (user_name.includes("infinity")) {
console.log("User, "+user_name+", has been blocked.");
post.innerHTML = "<div style='color: #D5DEE5;'>User, "+user_name+", has been blocked.</div>";
};
};
};
EDIT: FUCK, I had a syntax error too...
There was a semicolon (";") inside my "if" statement.
The updated code will work EXCEPT THAT, on top of all that, finny has altered "infinityshock" to "inflnityshock". -
2019-03-07 at 12:23 AM UTCAlso, in case anyone is not too sure how to use GreaseMonkey, the procedure is pretty quick and straight forward (and probably quite similar for TamperMonkey as well):
1. Google "GreaseMonkey" and go to the site to install it.
2. Click "Add to Firefox" or some such button.
3. Go to the little monkey icon in the top right of your browser, click it, then in the drop down menu, click "New user script".
4. Copy the JS script from this page into that new script (underneath the commented lines at the very top (in orange)).
5. Check under the monkey icon dropdown menu to see if your new script is enabled. -
2019-03-07 at 12:27 AM UTC
-
2019-03-07 at 3:45 AM UTCWELL FUCKING PLAYED FINNY...
The whole enhancement-by-username thing just ain't gonna cut it, apparantly.
By him changing it to "inflnityshock", the script is now useless.
You might want to just ban by registration date like before, but be forewarned that some legit new users will also be blocked. -
2019-03-07 at 3:50 AM UTC
Originally posted by gadzooks Here's a version that simply looks for the substring "infinity" in the username (in case you would rather block on that basis than to block based on registration date:
if (window.location.hostname === 'niggasin.space') {
var posts = document.getElementsByClassName('post');
for (var i = 0; i < posts.length; i++) {
var post = posts[i];
var user = post.getElementsByClassName('user-block')[0].getElementsByTagName('a')[0];
var user_id = parseInt(user.href.split("/").slice(-1)[0]);
var user_name = user.innerText;
if (user_name.includes("infinity")) {
console.log("User, "+user_name+", has been blocked.");
post.innerHTML = "<div style='color: #D5DEE5;'>User, "+user_name+", has been blocked.</div>";
};
};
};
EDIT: FUCK, I had a syntax error too…
There was a semicolon (";") inside my "if" statement.
The updated code will work EXCEPT THAT, on top of all that, finny has altered "infinityshock" to "inflnityshock".
There was a syntax error here as well (my bad). -
2019-03-07 at 3:54 AM UTC
-
2019-03-07 at 2:18 PM UTC
-
2019-03-07 at 3:46 PM UTC
-
2019-03-07 at 4:46 PM UTCHow about some simple if fil+ering.
Like if (post has more than 1 image or has more than 10 newlines) and user is new then block. -
2019-03-07 at 7:21 PM UTC
Originally posted by MORALLY SUPERIOR BEING V: A Cat-Girl/Boy Under Every Bed How about some simple if fil+ering.
Like if (post has more than 1 image or has more than 10 newlines) and user is new then block.
Yeah I'm gonna explore play around with a few different conditionals to try and find an optimal setup.
ALSO, I want to allow for user customization for users to be able to adjust various settings... It's basically turning into a full-fledged Firefox Add-On. But that's for a long-term project. -
2019-03-14 at 11:59 AM UTCEvery infinityshock influx, I will continue bumping this thread.
-
2019-03-16 at 4:14 PM UTC
Originally posted by gadzooks WELL FUCKING PLAYED FINNY…
The whole enhancement-by-username thing just ain't gonna cut it, apparantly.
By him changing it to "inflnityshock", the script is now useless.
You might want to just ban by registration date like before, but be forewarned that some legit new users will also be blocked.
Didn't you run a language analysis on Finny? If you're going through the effort of writing user scripts and doing a language analysis why not make a scraper, host NiS on your own machine feed the DB the posts and build a bot that simply copies the contents of your post box to the real NiS when you hit 'Submit'. Then you write something that analyzes all the posts you got stored locally, heck analyze them in transit to your mirror if you can. enhancement out any user that has more than 10 posts with the same language comprehension score as finny, grab the username directly from the post and purge all the account's activity from the local DB. -
2019-03-16 at 4:18 PM UTCHeck write a fucking user script that redirects you to 127.0.0.1:1337 whenever you type 'niggasin.space' into your browser. Be sure to host NiS on an IP/PORT that reflects what you put the user script.
-
2019-03-16 at 4:19 PM UTCOr you know, just host a local mirror and delete finny by hand via the adminCP and stuff. I tend to over complicate things.
-
2019-03-17 at 12:35 AM UTC
Originally posted by Sophie Didn't you run a language analysis on Finny? If you're going through the effort of writing user scripts and doing a language analysis why not make a scraper, host NiS on your own machine feed the DB the posts and build a bot that simply copies the contents of your post box to the real NiS when you hit 'Submit'. Then you write something that analyzes all the posts you got stored locally, heck analyze them in transit to your mirror if you can. enhancement out any user that has more than 10 posts with the same language comprehension score as finny, grab the username directly from the post and purge all the account's activity from the local DB.
Funny you should mention that, because it's very, very similar to one of the projects I'm currently working on now that I have archived the entire site (just finished the other day - I throttled myself for the sake of the site, but in about a day I got everything (except PMs, etc).
I never thought of mirroring it to a different URL/IP, though. My plan to analyze finny posts for post patterns (and his are ridiculously consistent, clearly; an absolute cakewalk for machine learning), but I hadn't really gotten into the real-world applications of it all; it was merely a research / practice project for me thus far. -
2019-03-17 at 1:06 PM UTC
Originally posted by gadzooks Funny you should mention that, because it's very, very similar to one of the projects I'm currently working on now that I have archived the entire site (just finished the other day - I throttled myself for the sake of the site, but in about a day I got everything (except PMs, etc).
I never thought of mirroring it to a different URL/IP, though. My plan to analyze finny posts for post patterns (and his are ridiculously consistent, clearly; an absolute cakewalk for machine learning), but I hadn't really gotten into the real-world applications of it all; it was merely a research / practice project for me thus far.
You like big data? I like security, maybe we should build something together. I know an ML expert that might be willing to help as well if we are going to be implementing some sort of AI. -
2019-03-17 at 1:10 PM UTCIn fact there's a bunch of real world applications i can conjure up in my mind for this. Some nefarious, some benign. Pick your fancy.