What software have you made to improve your workflow or rice? - Desktop Customization & Workflow

Users browsing this thread: 1 Guest(s)
kontroll
Registered
(11-09-2019, 11:09 AM)budRich Wrote:
(11-09-2019, 07:05 AM)zge Wrote: Thanks, but shouldn't the regex be have a ^ and a $? If I'm not mistaken, your bloking anyone who has "jkl" as a substring.

^^ Also, not sure how clever it is to use googleapis...

When fraun was interested i got interested too, so I searched for "userscript to hide annoying users on forum". I found a pastebin with a script for some other forum, and just hacked on it till jkl disappeared. I don't know javascript or jQuery, but i am sure there is a way to do it without jQuery at all, and maybe it can be included in some other way then google api. I use decentraleyes, and i think it always uses local jquery anyways.

And yes, the regex could be improved, maybe not using a regex at all and only test for exact matches would be better.

I registered for the sole purpose of submitting an improvement.

Code:
$('table').has("a[href='https://nixers.net/member.php?action=profile&uid=1548']").has("span[class='usernames']").css('display', 'none');

It selects only tables where there is a child <a> element that links directly to the offending user. And because this created problems with the main forum page, it also requires a <span> child with the class of 'usernames'. It appears sufficiently specific to circumvent any overzealous matching, and small enough to please the eye.


Messages In This Thread
RE: What software have you made to improve your workflow or rice? - by kontroll - 17-09-2019, 07:36 AM