|
Thanks. =D
Can't quite get it to work though.
I set the @match to http://www.liquidlegends.net/forum/* and modified the default user for what I want. Not sure where to go from here.
Do I have to change the match to the forum the poster is from even if I'm viewing it from LL?
|
|
On January 29 2018 01:21 Gahlo wrote:Thanks. =D Can't quite get it to work though. I set the @match to http://www.liquidlegends.net/forum/* and modified the default user for what I want. Not sure where to go from here. Do I have to change the match to the forum the poster is from even if I'm viewing it from LL? Doesn't it just remove blocks from the html if the poster id matches a blocked one?
As far as I can tell the match just has to be the page you're viewing it from, as that's what triggers whether the script should run or not. A post on TL looks something like this + Show Spoiler + <tr><td colspan="2" class="fpost"><div><a id="36562"></a> <div class="solid"> <section class="pnt01" style="background-image:url(/images/lol/teams/5.png)"> <header class="titlehigh"> <div> <div class='forummsginfo'> <div class='classicon heroes' tabindex="11235" style="background-image: url(/images/lol/champions/86.png)"> <aside class="tooltip"> <div class="tt-tail"></div> <div class="hitbox"></div> <div class="inventory"> <div><a href="/mytlnet/store.php"><img src="/images/lol/items/106.image" alt="" title="Liandry's Torment"></a></div><div><a href="/mytlnet/store.php"><img src="/images/lol/items/34.image" alt="" title="Boots of Swiftness"></a></div><div><a href="/mytlnet/store.php"><img src="/images/lol/items/243.image" alt="" title="Dead Man's Plate"></a></div> <div><a href="/mytlnet/store.php"><img src="/images/lol/items/176.image" alt="" title="Rylai's Crystal Scepter"></a></div><div><a href="/mytlnet/store.php"><img src="/images/lol/items/198.image" alt="" title="Spirit Visage"></a></div><div></div> </div> </aside> </div> <div class="fpost-username" tabindex="11235"> <span>JimmiC</span> <span class="userarrow"></span> <aside class="tooltip"> <a class="tt-userinfo" href="/forum/profile.php?user=JimmiC">Profile</a> <a class="tt-userinfo" href="/mytlnet/index.php?view=new&to=JimmiC">PM</a> <span class="tt-userinfo">Joined May 2011</span> </aside> </div> <div class="fpost-userinfo"> <span class="tt-userinfo">Canada</span><span class="tt-userinfo">4991 Posts</span> </div> </div> </div><div style="float:right;"> <div class="fpost-postinfo"> <div class="fpost-lastedit"><aside class="tooltip"><span class="tt-userinfo">Last Edited: 2018-01-28 18:55:59</span></aside></div> <a href="/forum/viewpost.php?post_id=26899716" class="submessage" title="Link to this post">2 hours ago</a> <div class="submessage">#36562</div> </div> </div> </header> <article class="forumPost"> <section>Wait, what, wait... you mean I can make it so I can never see JimmyJraynor posts again? For real?<br><br>edit: Didn't work for me =-(</section> </article> </section> <footer> <div class="forumsig"> <div>My bad, poor guy</div> </div><div class="forumsig"> <span class="contrib"> <a target="_blank" href="http://www.teamliquid.net/plus/"><img alt="TL+ Member" title="TL+ Member" src="/images/forum/user_plus.png" width="20" height="20"></a> <a><img src="/images/forum/user_plus_5.png" width="20" height="20" title="TL+ Santa"></a> </span> </div> </footer> </div> <div class="fpost-actionable"> <div class="postaction"> <div class="useraction"> <a href="/forum/postmessage.php?quote=36562&topic_id=487322" class="submessage">Quote</a> <a href="/forum/report.php?post_id=26899716" class="submessage flag">Report</a> </div> <div class="modaction"> </div> </div> </div> </td></tr>
So it looks over all elements to find one where the variable fpost-username = "BANNED USER NAME", then deletes the entire associated html element. (In this case the post.)
So in the example above it would be checking
<div class="fpost-username" tabindex="11235"> <span>JimmiC</span>
to see if JimmiC was in the array of banned strings, and if so searching the element which this fpost-username was in for the post text field and replacing that with "herp derp."
|
Fuck if I know how it works, I never learned that language and my coding in general is as useful as my toddler-like, 6 year rusty French.
|
As far as i can tell all the identifiers are the same in the LL source as in LD. header.titlehigh and article.forumPost are both there.
Might install greasemonkey and see if i can fix it
|
|
Damn I'm rusty at javascript.
Couldn't get his working so i rewrote it into javascript. Paste all this into your chosen monkey, (I used violentmonkey since apparently tampermonkey sold out and or something?) and it should work. At least on all non IE browsers :p
+ Show Spoiler +// ==UserScript== // @name Mute Users in LiquidLegends // @description Mutes users in LiquidLegends // @match http://www.liquidlegends.net/forum/*// @grant none // ==/UserScript== // Based on http://www.liquiddota.com/blogs/491245-mute-annoying-users-in-lr-threads // adapted for Liquidlegends in javascript (very badly) by killerdog // // // edit MUTED_USERS with the users you want to mute // e.g. to block users foo, bar and baz you'd change the line below to // var MUTED_USERS = ["foo", "bar", "baz"]; // NOTE: usernames are case sensitive var MUTED_USERS = ["Gahlo"]; //sorry gahlo :p //edit "Replacement_String" set what you want their comments to be replaced with. //e.g. for "MTG Stuff" you'd change the below line to // var Replacement_String = "MTG Stuff" var Replacement_String = "This user is ignored" // // //Do not edit below this // // var posts = document.getElementsByClassName("fpost-username")//collects all posts by who posted them for (var j = 0; j < posts.length; j++) { var el = posts[j]; var user = el.innerText.substring(0, el.innerText.indexOf(' Profile'))//extracts poster id from posts for (var i = 0; i < MUTED_USERS.length; i++) { //cycles through ignored posters if (user == MUTED_USERS[i]) { //checks if the poster of this post is an ignored poster el.closest("header.titlehigh").nextSibling.nextSibling.textContent = Replacement_String; //if the user was ignored, this replaces their comment with the chosen filer } } };
should look like this + Show Spoiler +
|
|
Still not working for me. =[
|
Look at this guy pushing his agenda sneakily. You should be ashamed, I say!
|
Here's something I found in my tampermonkey + Show Spoiler +// ==UserScript== // @name wei2filter // @namespace nolenroyalty.com // @description lol // @include http://www.liquidlegends.net/forum/*// @include https://www.liquidlegends.net/forum/*// @version 1 // @grant none // ==/UserScript== var spans = document.getElementsByTagName('span'); var l = spans.length; var quotes = ["Polish gulags", "It ain't my fault this nigga bitch say she in love with me.", "I been ballin' so damn hard I swear I think that I'm Kobe.", "I'm startin' off my day with a blunt of herb. Lookin' myself up see how much I'm worth.", "BANG BANG", "Damn I hate being sober, I'm a smoker.", "I can't handle no liquor. But these bitches can't handle me. I can't control my niggas. And my niggas they can't control me.", "I can't handle no liquor. But these bitches can't handle me. I can't control my niggas. And my niggas they can't control me. You say you know me, my nigga but you really just know the old me.", "A fuck nigga, that's that shit I don't like, nah. A snitch nigga, that's that shit I don't like, nah."]; for (var i=0; i<l; i++) { var span = spans[i]; if (span.innerHTML === "Gahlo") { var par = span.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode; article = par.getElementsByTagName("article")[0]; section = article.getElementsByTagName("section")[0]; section.innerHTML = quotes[Math.floor(Math.random()*quotes.length)]; } }
Replace "Gahlo" with any poster and "quotes" with message you want every single one of their posts to be. kd's one works for me as well though so idk.
|
On January 29 2018 08:36 AlterKot wrote:Here's something I found in my tampermonkey + Show Spoiler +// ==UserScript== // @name wei2filter // @namespace nolenroyalty.com // @description lol // @include http://www.liquidlegends.net/forum/*// @include https://www.liquidlegends.net/forum/*// @version 1 // @grant none // ==/UserScript== var spans = document.getElementsByTagName('span'); var l = spans.length; var quotes = ["Polish gulags", "It ain't my fault this nigga bitch say she in love with me.", "I been ballin' so damn hard I swear I think that I'm Kobe.", "I'm startin' off my day with a blunt of herb. Lookin' myself up see how much I'm worth.", "BANG BANG", "Damn I hate being sober, I'm a smoker.", "I can't handle no liquor. But these bitches can't handle me. I can't control my niggas. And my niggas they can't control me.", "I can't handle no liquor. But these bitches can't handle me. I can't control my niggas. And my niggas they can't control me. You say you know me, my nigga but you really just know the old me.", "A fuck nigga, that's that shit I don't like, nah. A snitch nigga, that's that shit I don't like, nah."]; for (var i=0; i<l; i++) { var span = spans[i]; if (span.innerHTML === "Gahlo") { var par = span.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode; article = par.getElementsByTagName("article")[0]; section = article.getElementsByTagName("section")[0]; section.innerHTML = quotes[Math.floor(Math.random()*quotes.length)]; } } Replace "Gahlo" with any poster and "quotes" with message you want every single one of their posts to be. kd's one works for me as well though so idk. Ah, that one seems to work. Thanks. =]
|
Sick Yeezus plug alterkot
|
Don't you guys all love each other here, what's with the passive aggressive censorship?
|
I'm curious how efficient kot's one would be if it ran on a 50 or 100+ post page, although I guess probably doesn't matter.
Still only lets you filter one person though, objectively inferior :p
On January 29 2018 08:22 Gahlo wrote: Still not working for me. =[ What browser do you use?
I had some problems making it work in all environments, but I thought I'd fixed it to a point where it worked in everything except IE. Might have been missing some ;'s though
On January 29 2018 16:11 Uldridge wrote: Don't you guys all love each other here, what's with the passive aggressive censorship? Could change it so it filters out all americans or all euros based off country. Then we can go full culture war
|
On January 29 2018 16:11 Uldridge wrote: Don't you guys all love each other here, what's with the passive aggressive censorship? It's not here that I need it. It's a nutjob in US Politics thread that I have to struggle to not get banned when I read their nonsense.
On January 29 2018 17:31 killerdog wrote: What browser do you use?
Firefox. The Wei2 script AlterKot posted works fine.
|
Just for the record I don't remember who wrote it and I'm not even sure if I made any of the quotes myself, it's just been sitting in my tampermonkey unused and I figured it could work.
|
|
On January 29 2018 23:01 JimmiC wrote:Show nested quote +On January 29 2018 21:58 Gahlo wrote:On January 29 2018 16:11 Uldridge wrote: Don't you guys all love each other here, what's with the passive aggressive censorship? It's not here that I need it. It's a nutjob in US Politics thread that I have to struggle to not get banned when I read their nonsense. On January 29 2018 17:31 killerdog wrote: What browser do you use? Firefox. The Wei2 script AlterKot posted works fine. I got the same issue but in some of the sports threads. Reading one guy just gets me in to trouble. If the one you have doesn't work for multiple users try the one I posted, it's KD's with a couple semi colons added. But I am using chrome
I remember JimmyJ from back when I used to participate in all the NBA threads on TL(saw you mention his name earlier). Dude is the poster boy of arguing for the sake of arguing, he will take any position he needs to if it means it will rile up the other TL users into a flame fest of subjective opinions while acting like his position is the one based on facts(lul facts in sports).
|
|
|
|
|