|
If anyone else has any ideas for Greasemonkey scripts, we can start putting together a collection of neat things to enhance the site. Greasemonkey is a Firefox plugin, but many of these scripts also works natively with Chrome. I'm not sure about other browsers, though.
Here are the scripts:
Banned User Link by visual77 / palmerdabbelt - Modifies the banned user thread to turn the banned user's name into a link to their post history.
Post Colours by GaiaCat - This plugin colors posts from certain people. Click on an empy part of the titlebar of a post (dark blue part). It will cycle through 3 colours: green, red and normal. Note that this script only works on GreaseMonkey and will not work in Chrome.
Unspoiler All by zatic - This script lets you remove all spoiler tags on a page at once.
Miscellaneous collection of stuff by zatic - Most of it is outdated, but it's worth a look anyway.
TLPD Spoiler by palmerdabbelt - it hides the records and the last 10 games at the bottom of every TLPD page
+ Show Spoiler [Sidebar Updater] +http://userscripts.org/scripts/show/98069
|
wow thanks for the script. now i dont have to refresh my TL tabs =D
|
Installed on chrome and it works. Thank you
|
Can we show this guy some love so more people see this thread? This is such a nice little script.
|
Ty for the work you put into this script very useful.
|
I tried installing this script with Safari. Seems it's not working. =(
Ah, well. It's nice that you made the time to create something useful like this. Kudos to you; I'm sure many people will use it. Great wor—
Holy shit, as I was typing this, it updated. You rock! =D
|
Wow first thought that popped into my head, when opening the thread, was Team Liquid making a second Team called Greasemonkeys.Damn you Tyler!
Anyway, doesnt this put a really high strain on the servers if anyone is using it? Especially, when some popular events are going on and you know it is not out of the ordinary for me to have alot of tabs of teamliquid open. Actually right now i have 4 TL Tabs open.
That said i totally get where you are coming from. Happens really often to me to that i click on a stream and it is dead, since the website is like 30 mins old. So thank you!
|
Amazing work, i have had the same problem and always wished for a fix like this. Thanks!
|
Awesome!!! this is going to be extremely useful! Thanks so much for posting this.
|
|
Thanks for the positive feedback, everyone.
As far as hitting the TL servers too hard, that is a possibility. However, me doing a background request every 60 seconds while watching a stream is significantly less than me actively browsing, so I don't think it's too big of a deal.
I could possibly add some kind of interface, as unobtrusive as possible, that lets you adjust the timer or turn it off entirely. This version is just the barebones starting point. I'd like to expand upon the concept as I get community feedback.
Good to know it works in Safari! Did you have to install a plugin like Greasemonkey, or did it natively install like on Chrome?
|
oh nifty
I swear waiting for the sidebars to refresh was the longest 60 seconds of my life, my eyes twitched a few times and I thought I had missed it by accident or something lol. But when it happened, it was great.
|
On March 01 2011 12:31 visual77 wrote: Thanks for the positive feedback, everyone.
As far as hitting the TL servers too hard, that is a possibility. However, me doing a background request every 60 seconds while watching a stream is significantly less than me actively browsing, so I don't think it's too big of a deal.
I could possibly add some kind of interface, as unobtrusive as possible, that lets you adjust the timer or turn it off entirely. This version is just the barebones starting point. I'd like to expand upon the concept as I get community feedback.
Good to know it works in Safari! Did you have to install a plugin like Greasemonkey, or did it natively install like on Chrome? I had to install Greasemonkey, which is unfortunately a bit of a hassle on Macs. However, I have nothing but praise for the script so far. Simple and flawless. I commend you for your work, Visual.
|
simple yet amazingly useful, thanks!
|
Installed really quick and it works great. This is amazing; thanks a bunch!
|
Sweet! Chrome user here and I'm loving it. Good work!
|
|
If I knew how I would give it a shot myself, but you wouldn't happen to be able to tweak it a bit to update the times of when future events start would you? I'm loving this, but that also came to mind since it seems like a feature that would be able to be implemented easily (or maybe it isn't, I dunno greasemonkey really :S).
|
Thanks, this will be super helpful for checking streams and such. Great work!
|
On March 02 2011 12:13 Grobyc wrote: If I knew how I would give it a shot myself, but you wouldn't happen to be able to tweak it a bit to update the times of when future events start would you? I'm loving this, but that also came to mind since it seems like a feature that would be able to be implemented easily (or maybe it isn't, I dunno greasemonkey really :S).
It does update the countdown time on the calendar on the right on the site, it also updates the current streamers. After install of the script the time will clock down each minute that goes by for the events that are only a litte ways away.
I think thats what your talking about if not then could you clarify?
|
On March 02 2011 12:13 Grobyc wrote: If I knew how I would give it a shot myself, but you wouldn't happen to be able to tweak it a bit to update the times of when future events start would you? I'm loving this, but that also came to mind since it seems like a feature that would be able to be implemented easily (or maybe it isn't, I dunno greasemonkey really :S).
I think it already does update when future events start. The script is just updating the left and right sidebars in their entirety. If you are talking about the 'Upcoming Events' section right below 'Live user streams', then it is updating. Otherwise, I'm not sure which section of the page you're talking about.
|
For google chrome, you literally click the link, hit install, and restart chrome. That's it, and you now have a great new script and don't have to click f5 all the time
Thank You Visual77!
|
ahhh cool I didn't even notice actually. that's exactly what I was referring to. nvm! :D
|
I was looking at another thread and, by joves, I saw this thread pop up back on the sidebar because of the script. Whoo, was that a rush! Excuse me, I have to regain my composure.
|
intrigue
Washington, D.C9933 Posts
holy shit this is great. hopefully rich approves, and even if he doesn't i'll use it anyway! ha ha HA! rich isn't the boss of me
|
On March 02 2011 12:57 intrigue wrote: holy shit this is great. hopefully rich approves, and even if he doesn't i'll use it anyway! ha ha HA! rich isn't the boss of me We just took a vote, and R1CH is now officially the boss of you.
|
why does it say it can access my data on all websites 0.o
|
intrigue
Washington, D.C9933 Posts
On March 02 2011 13:01 SonuvBob wrote:Show nested quote +On March 02 2011 12:57 intrigue wrote: holy shit this is great. hopefully rich approves, and even if he doesn't i'll use it anyway! ha ha HA! rich isn't the boss of me We just took a vote, and R1CH is now officially the boss of you. not until i'm on a salary.
also, i saw it update just now. watching thread bumping IN REAL TIME!!! wowowoowo can't go back to stone-age tl browsing after today
|
Canada5155 Posts
Holy moley. If R1CH approves, I say this should be spotlighted (or integrated right into the site)... because... holy crap.
So damned useful.
A++ Would install again.
|
|
On March 02 2011 13:01 HaruHaru wrote: why does it say it can access my data on all websites 0.o
I'm not too experienced with Chrome scripts, so I don't know how to limit what it claims it can do. The source code is freely available, though. If you know JavaScript, you can see all the script is doing is a background request to teamliquid.net every 60 seconds, then doing some string parsing on the result, and swapping out some elements on the current page with the same elements on the requested page.
|
Dude this is the greatest thing I've installed for Chrome. Ever. Thank you so much
|
Canada8029 Posts
On March 02 2011 13:01 HaruHaru wrote: why does it say it can access my data on all websites 0.o It's standard disclaimer stuff. If you look at the code for this script itself, you can see that it does nothing of the sort.
|
o ok thanks a lot for the script!
|
On March 02 2011 13:06 HawaiianPig wrote: Holy moley. If R1CH approves, I say this should be spotlighted (or integrated right into the site)... because... holy crap.
So damned useful.
A++ Would install again.
Hah, it needs work before it can be straight integrated. Specifically, the calls to window.addEventListener and XMLHttpRequest don't work in IE. Workarounds are common knowledge and I just need to write in that cross browser support, but as it stands now, it has fairly limited support. I'm working on these issues, plus giving it a basic control panel to adjust what sections to update and how often to update, and I'll put it up once I'm done in a day or two.
Although I might delay putting it up until rich gives the green light. If there is actual admin concern over that, I don't want to overstep my bounds and release code that could flood the servers. Or, at least, not release more of that code.
|
Woot, glad I decided to visit the General forum this morning. Thanks a lot for these gems.
|
Was using it, but it seems to have stopped working in the last day or so for my FF.
Has it for anyone else? Also when I tried to reinstall it, I see the code instead of it installing with one click?
|
Have to try this at home when i get there. Thanks in advance.
|
Canada7170 Posts
lol I remember using zatic's stream script for OSL- it was the reason I got Greasemonkey in the first place. This sounds really good, excellent work!
|
Strangely coincides with the whole site going down.
What have you done !
+ Show Spoiler +
|
Zurich15325 Posts
|
I would recommend a mostly empty page containing only important data without images and stuff for an easier analysis of js scripts an such...
... Or a TL Service API 
|
I just added a second greasemonkey script. This one modifies the banned user thread so each banned user's name becomes a link to their post history.
Also, the sidebar updater does appear to have crashed on Firefox. I'll try to get that one patched up and put it back online.
|
Works great, thanks for taking the time to make this!
|
This worked great on chrome but i just switched to firefox 4! Does this work on ff4?
|
On March 23 2011 13:53 HaruHaru wrote: This worked great on chrome but i just switched to firefox 4! Does this work on ff4?
That depends more on Greasemonkey than on my scripts. The script itself is using very standard javascript calls that are not dependent on the browser and should work on anything semi-modern.
|
Here's a small, hack'ish script for colouring the body of posts from specific people.
Install script, reload page, and click on an empy part of the titlebar of a post (dark blue part) It will cycle through 3 colours: green, red and normal.
The names are stored in about:config and thus persist through sessions. I have no idea about the character limit but it's larger than 1024 bytes, or 50+ names which should be more than enough for most people's needs. Only tested with FireFox 3.6
http://gaiacat.homepage.dk/teamliquid_-_post_colours.user.js
Source in case file is unavailable: + Show Spoiler +// ==UserScript== // @name TeamLiquid - Post Colours // @namespace GaiaCaT // @description Coloured Posts // @version 0.9 // @include http://teamliquid.net/*// @include http://www.teamliquid.net/*// ==/UserScript== var post = document.getElementsByClassName('solid'); var colourize = eval(GM_getValue('Colourize', '[]')); for (i in post) { post[i].getElementsByClassName('titelbalk')[0].addEventListener("click", my_func, true); postname = String(post[i].getElementsByClassName('forummsginfo')[0].textContent.match(/\w+/)); for (j = 0; j < colourize.length; j++) { if (postname == colourize[j][0]) { if (colourize[j][1] == 1) { post[i].getElementsByClassName('lichtb')[0].style.backgroundColor = '#F0FFF0'; } if (colourize[j][1] == 2) { post[i].getElementsByClassName('lichtb')[0].style.backgroundColor = '#FFF0F0'; } } } } function my_func(event) { postname = String(event.target.getElementsByClassName('forummsginfo')[0].textContent.match(/\w+/)); var foundposter = false; for (i = 0; i < colourize.length; i++) { if (colourize[i][0] == postname) { if (colourize[i][1] == 1) { colourize[i][1] = 2; } else if (colourize[i][1] == 2) { colourize.splice(i, 1); } var foundposter = true; } } if (foundposter == false) { colourize.push([postname, 1]); } GM_setValue('Colourize', uneval(colourize)); location.reload(false); }
|
On July 26 2011 06:24 GaiaCaT wrote:Here's a small, hack'ish script for colouring the body of posts from specific people. Install script, reload page, and click on an empy part of the titlebar of a post (dark blue part) It will cycle through 3 colours: green, red and normal. The names are stored in about:config and thus persist through sessions. I have no idea about the character limit but it's larger than 1024 bytes, or 50+ names which should be more than enough for most people's needs. Only tested with FireFox 3.6 http://gaiacat.homepage.dk/teamliquid_-_post_colours.user.jsSource in case file is unavailable: + Show Spoiler +// ==UserScript== // @name TeamLiquid - Post Colours // @namespace GaiaCaT // @description Coloured Posts // @version 0.9 // @include http://teamliquid.net/*// @include http://www.teamliquid.net/*// ==/UserScript== var post = document.getElementsByClassName('solid'); var colourize = eval(GM_getValue('Colourize', '[]')); for (i in post) { post[i].getElementsByClassName('titelbalk')[0].addEventListener("click", my_func, true); postname = String(post[i].getElementsByClassName('forummsginfo')[0].textContent.match(/\w+/)); for (j = 0; j < colourize.length; j++) { if (postname == colourize[j][0]) { if (colourize[j][1] == 1) { post[i].getElementsByClassName('lichtb')[0].style.backgroundColor = '#F0FFF0'; } if (colourize[j][1] == 2) { post[i].getElementsByClassName('lichtb')[0].style.backgroundColor = '#FFF0F0'; } } } } function my_func(event) { postname = String(event.target.getElementsByClassName('forummsginfo')[0].textContent.match(/\w+/)); var foundposter = false; for (i = 0; i < colourize.length; i++) { if (colourize[i][0] == postname) { if (colourize[i][1] == 1) { colourize[i][1] = 2; } else if (colourize[i][1] == 2) { colourize.splice(i, 1); } var foundposter = true; } } if (foundposter == false) { colourize.push([postname, 1]); } GM_setValue('Colourize', uneval(colourize)); location.reload(false); }
That's pretty cool. I updated the OP with that. I'll see if I can get it working in Chrome, too.
|
I've been looking for this forever! Thank you sir bumper!
|
Looks like a recent HTML change is causing the right sidebar to not update properly, and instead it includes the entire page. I'll fix that ASAP.
Edit: Okay, not right sidebar. It's the left that's doing it. It seems like the regex isn't matching anymore, but it's a very simple regex and the pattern should still be good. Can anyone confirm if this bug exists on anything other than Chrome?
Edit #2: Or it is the right. I feel like I'm going crazy.
|
thanks for your work, this script is amazing.
|
Ahhh it all makes sense now lol.
|
Sup dawg. Heard you like TL, so I glitched out a script so you can browse TL while you're browsing TL.
Okay, it's fixed. The change was a simple removal of some whitespace at the right sidebar HTML start. Just reinstall it to get the newest version that doesn't give you TLception.
|
I was just coming here to mention the new TLception problem and see it was already fixed. Much love man, much love.
|
Yea I had that problem and luckily its fixed now!!
|
Zurich15325 Posts
|
The banned user sript is pretty sweet and helps my guilty pleasure.
|
Actually, nvm, i don't think enough ppl care given that this is general.
|
This got fixed quickly. Great job!
|
I've added this to the OP. I also put in your other collection of scripts that I somehow missed months ago.
|
Thanks for the quick and fast update.
|
I have a request :
I would like that my TLPD-ize button always TLPD-ize to sc2-korean. So NaDa becomes NaDa
ThorZaIN becomes ThorZaIN and same for the maps, Crevasse becomes Crevasse
You can see there's a difference between nada and thorzain. For tlpd#players#147#T]NaDa it uses the bw-korean database so there is no suffix after the race, for tlpd#players#1795#T#sc2-international]ThorZaIN it uses the sc2-international, same for the map. Basically I would like that if after the race there is nothing it adds #sc2-korean, and if it detects #sc2-international it changes it to #sc2-korean.
That would be greatly appreciated.
|
Looks like special pages without sidebars, like http://www.teamliquid.net/mlg/ do not play nice with the Sidebar Updater. Unfortunately, I won't be able to get to that until sometime Sunday.
|
I've updated the TLSU to fix the crashes on special sidebar free pages.
|
|
Where did the sidebar updater script go? I just reformatted my computer and I want it back, please!
|
The greasemonkey script is now broken by the new site changes. A fix would be greatly appreciated
|
To fix the sidebar updater script with the new layout, change this line:
start : '<!--Right sidebar start-->\n<td valign="top" width=180 style="text-align: center">', to
start : '<!--Right sidebar start-->\n<td valign="top" style="text-align:center">',
|
|
how do i apply this fix? Wat options do I have to change and where?
|
A script which "collapses" posts by people with less than 1000 posts would be awesome.
Try to ignore the irony of this post.
|
On November 01 2011 18:37 mardi wrote: how do i apply this fix? Wat options do I have to change and where?
Addons==>User Scripts==>Right click on TL sidebar updater==>show containing folder==> right click on script, click edit, and apply fix as listed. save.
|
Anyone that could take a quick look on zatics unspoiler all script? The button seems to not show up anymore on the new forum width
|
|
On November 01 2011 18:14 squeek wrote:To fix the sidebar updater script with the new layout, change this line: Show nested quote +start : '<!--Right sidebar start-->\n<td valign="top" width=180 style="text-align: center">', to Show nested quote +start : '<!--Right sidebar start-->\n<td valign="top" style="text-align:center">',
Thanks for the fix. I went ahead and put this in the Sidebar Updater file on userscripts.org.
http://userscripts.org/scripts/show/98069
|
The fix doesn't work for me, only when viewing/posting a thread though.... it kicks the thread box sideways
|
Yeah this is weird, it seemed to have worked last night.
|
Another fix is required; TL must have changed this sometime today. This time, in leftDetails instead of rightDetails, change this line:
start : '<table width=994 cellpadding=0 cellspacing=0><tr><td valign="top" width=180 rowspan=2 style="text-align: center">', to
start : '<table width=1136 cellpadding=0 cellspacing=0><tr><td valign="top" width=180 rowspan=2 style="text-align: center">',
|
I wrote a script to de-widen the layout when reading a thread. (This way it's possible to view an LR thread and a stream side-by-side on a small-ish monitor. Also, it's easier to read.)
http://userscripts.org/scripts/show/116962
The ad has to move to allow the layout to shrink, so I try to move it above the sidebars. Unfortunately, this doesn't work (you see the elephant) until you reload the page, and I have not a clue how to fix it.
Also, it actually broke about 30 minutes ago since (I assume) an admin modified the HTML to put width attributes on more elements. It's pretty likely this will happen again, I guess, and the script is not at all robust to such changes.
|
|
I wrote a script that allows you to view TLPD without seeing last night's proleage spoilers (for use by Sayle in his SPL Rebroadcasts). I don't know if it's particularly useful for anyone else, but it's online in case anyone wants it.
http://userscripts.org/scripts/show/123163
|
|
|
Aotearoa39261 Posts
Awesome work
|
after the TL update, the sidebar auto updater doesnt seem to work anymore. Is there a fix?
|
|
|
|