Come here to get the Block functionality for Wrongplanet
The_Face_of_Boo
Veteran

Joined: 16 Jun 2010
Age: 38
Gender: Male
Posts: 30,298
Location: Beirut, Lebanon.
....for Chrome.
It doesn't only hide the blocked user's posts forever, but also hide any posts that contain quotes from the blocked user.
Demonstration: https://www.youtube.com/watch?v=B-zITW9 ... el=cupcake
And at the button you can find an unblock list; to unblock those that you may have accidentally blocked.
// @name Block people.
// @namespace https://wrongplanet.net
// @version 0.1
// @description try to take over the world! Muhahaha
// @author The_Face_of_Boo
// @match https://wrongplanet.net/*
// @grant GM.getValue
// @grant GM.setValue
// ==/UserScript==
(async () => {
'use strict';
let stringBlockList = await GM.getValue('stringBlockList');
let blockList = stringBlockList ? stringBlockList.split(',') : [];
let blockDiv = document.createElement("div");
let unblockButton = document.createElement("button");
document.body.appendChild(blockDiv);
document.body.appendChild(unblockButton);
//Create and append select list
var selectList = document.createElement("select");
selectList.size = "5";
selectList.id = "mySelect";
unblockButton.innerText = 'Unblock';
blockDiv.appendChild(selectList);
unblockButton.addEventListener("click", unblockMe, false);
//Create and append the options
blockList.forEach(blockedUser => {
var option = document.createElement("option");
option.value = blockedUser;
option.text = blockedUser;
selectList.appendChild(option);
})
console.log(blockList);
let elements = document.querySelectorAll('div.row');
let blockButtonHtml = `<button class="myButton" style='background:darkred'>Block</button>`;
function blockMe(evt) {
blockList.push(evt.currentTarget.user);
GM.setValue('stringBlockList', blockList.toString());
window.alert(evt.currentTarget.user + " is blocked");
location.reload();
}
function unblockMe() {
let select = document.getElementById("mySelect");
let user = select.options[select.selectedIndex].value;
let index = blockList.findIndex(e => e == user);
let newlist = removeItemWithSlice(index, blockList);
GM.setValue('stringBlockList', newlist.toString());
window.alert(user + " is unblocked");
location.reload();
}
function removeItemWithSlice(index, arr) {
return [...arr.slice(0, index), ...arr.slice(index + 1)]
}
elements.forEach((element, index) => {
let user = element.querySelector('.user-col').querySelector('p').querySelector('a').innerText;
///adding the block button for each post in page
let buttonsRow = element.querySelector('.action-bar');
buttonsRow.insertAdjacentHTML('beforeend', blockButtonHtml);
let blockButton = buttonsRow.querySelector('.myButton');
if (blockButton) {
blockButton.addEventListener("click", blockMe, false);
blockButton.user = user;
}
if (blockList.includes(user)) {
elements[index].remove();
}
///Removing posts with blocked people's quotes.
let quoteElements = element.querySelectorAll('.quotetitle') || [];
quoteElements.forEach(el => {
let trimmed = el.textContent.trim();
let replaced = trimmed.replace('wrote:', '').trim();
if (blockList.includes(replaced)) {
elements[index].remove();
}
});
});
})();
That someone else's video shows how to add the script: https://www.youtube.com/watch?v=RpjvLpy ... nel=JayJay
The_Face_of_Boo
Veteran

Joined: 16 Jun 2010
Age: 38
Gender: Male
Posts: 30,298
Location: Beirut, Lebanon.
Note: you can remove
_________________
Come here to get the Block functionality for Wrongplanet:
viewtopic.php?f=13&t=390645
Well this was easier than I thought. All I did was I copied and pasted the code when adding a new script and went to file and selected save and done. That simple.
Thank you, I have been wanting this feature.
_________________
Son: Diagnosed w/anxiety and ADHD. Also academic delayed.
Daughter: NT, no diagnoses.
Just a warning when you use this block button, when you block people, threads may not always make sense because you would have no way of seeing the ignored content and there would be no hint they had posted in it and you won't see their quotes either and you would only see the user's post but not the ignored content they quoted. There will be no option given to viewed the ignored content like other forums do.
Just pros and cons to blocking people. Threads may not make sense and it will look like some users are talking to themselves or having an argument with themselves.
_________________
Son: Diagnosed w/anxiety and ADHD. Also academic delayed.
Daughter: NT, no diagnoses.
Thank you, I have been wanting this feature.
Testing, testing, testing.

_________________
Laughter is the best medicine. Age-appropriate behaviour is an arbitrary NT social construct.

And one more thing,
"A stranger is a friend gang-stalker you haven't met yet." Humour is not meant to be taken seriously, yet many on the left pervert its intent.
Truth may be inconvenient but it is never politically incorrect...The Oracle of Truth has spoken...

THERE WILL BE NO COUP IN AMERICA!
Just pros and cons to blocking people. Threads may not make sense and it will look like some users are talking to themselves or having an argument with themselves.
I'd want the option to read the entire post.
I just scroll down posts from people I am not interested in.
Can someone explain why that isn't good enough? Seriously?

_________________
Laughter is the best medicine. Age-appropriate behaviour is an arbitrary NT social construct.

And one more thing,
"A stranger is a friend gang-stalker you haven't met yet." Humour is not meant to be taken seriously, yet many on the left pervert its intent.
Truth may be inconvenient but it is never politically incorrect...The Oracle of Truth has spoken...

THERE WILL BE NO COUP IN AMERICA!
Just pros and cons to blocking people. Threads may not make sense and it will look like some users are talking to themselves or having an argument with themselves.
I'd want the option to read the entire post.
I just scroll down posts from people I am not interested in.
Can someone explain why that isn't good enough? Seriously?

Some members here have OCD and they cannot skip over posts from a user because they cannot fight that compulsion to read it.
But this is just a heads up for anyone if they want to use this block feature.
_________________
Son: Diagnosed w/anxiety and ADHD. Also academic delayed.
Daughter: NT, no diagnoses.
I think you can get like addon packs for these type of forums, might be worth the admins getting some so we have more functionality.
I would never want to block anyone. I'm up for all feedback on my content -- even death threats if worded nicely.
_________________
Democrats and Republicans calling each other out for being corrupt is like the Lucchese crime family pointing fingers at the Gambino crime family for being crooks and murderers.
Well people have often blocked me for no reason on Facebook. I only block someone if they are a threat to my privacy or keep harassing and bullying me, but otherwise I don't go around blocking people.
But the mods on WP deals with bullying and harassment rather efficiently so I don't really see a reason or any point in blocking people here. Some people just use block features to be petty, spiteful or childish.
_________________
Female
Aged 30
On antidepressants
Diagnosed with AS, ADHD and anxiety disorder
Empathy score: 61 out of a possible 80. (High)
Just pros and cons to blocking people. Threads may not make sense and it will look like some users are talking to themselves or having an argument with themselves.
I'd want the option to read the entire post.
I just scroll down posts from people I am not interested in.
Can someone explain why that isn't good enough? Seriously?

Some members here have OCD and they cannot skip over posts from a user because they cannot fight that compulsion to read it.
But this is just a heads up for anyone if they want to use this block feature.
How many is "some"?

_________________
Laughter is the best medicine. Age-appropriate behaviour is an arbitrary NT social construct.

And one more thing,
"A stranger is a friend gang-stalker you haven't met yet." Humour is not meant to be taken seriously, yet many on the left pervert its intent.
Truth may be inconvenient but it is never politically incorrect...The Oracle of Truth has spoken...

THERE WILL BE NO COUP IN AMERICA!



_________________
Laughter is the best medicine. Age-appropriate behaviour is an arbitrary NT social construct.

And one more thing,
"A stranger is a friend gang-stalker you haven't met yet." Humour is not meant to be taken seriously, yet many on the left pervert its intent.
Truth may be inconvenient but it is never politically incorrect...The Oracle of Truth has spoken...

THERE WILL BE NO COUP IN AMERICA!

You're like the little adorable forum pet, who would block you *pat pat* ♡ ♡
bcousins
Veteran

Joined: 1 May 2011
Age: 25
Gender: Male
Posts: 801
Location: On a failed Tangara set at Blacktown
You can - but some websites are more customised behind the scenes than others, and sometimes addons don't play as nice.
_________________
Want another alternative to WrongPlanet?
https://aspergers.network/forums/ <- New Version Coming (hopefully) soon.
Similar Topics | |
---|---|
Do you dress for functionality or looks? |
28 Feb 2011, 10:27 pm |
Learning and functionality |
13 Nov 2010, 2:08 am |
Highly variable functionality |
10 Dec 2015, 8:21 pm |
today my level of functionality got changed |
16 Nov 2012, 8:28 pm |