• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 15:06
CET 21:06
KST 05:06
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10
Community News
Weekly Cups (Dec 1-7): Clem doubles, Solar gets over the hump1Weekly Cups (Nov 24-30): MaxPax, Clem, herO win2BGE Stara Zagora 2026 announced15[BSL21] Ro.16 Group Stage (C->B->A->D)4Weekly Cups (Nov 17-23): Solar, MaxPax, Clem win3
StarCraft 2
General
Weekly Cups (Dec 1-7): Clem doubles, Solar gets over the hump Chinese SC2 server to reopen; live all-star event in Hangzhou Maestros of the Game: Live Finals Preview (RO4) BGE Stara Zagora 2026 announced Weekly Cups (Nov 24-30): MaxPax, Clem, herO win
Tourneys
Sparkling Tuna Cup - Weekly Open Tournament StarCraft2.fi 15th Anniversary Cup RSL Offline Finals Info - Dec 13 and 14! Tenacious Turtle Tussle StarCraft Evolution League (SC Evo Biweekly)
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 503 Fowl Play Mutation # 502 Negative Reinforcement Mutation # 501 Price of Progress Mutation # 500 Fright night
Brood War
General
Let's talk about Metropolis BW General Discussion [ASL20] Ask the mapmakers — Drop your questions BGH Auto Balance -> http://bghmmr.eu/ Foreign Brood War
Tourneys
[Megathread] Daily Proleagues Small VOD Thread 2.0 [BSL21] RO16 Group D - Sunday 21:00 CET [BSL21] RO16 Group A - Saturday 21:00 CET
Strategy
Fighting Spirit mining rates Current Meta Game Theory for Starcraft How to stay on top of macro?
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread EVE Corporation Path of Exile ZeroSpace Megathread
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Mafia Game Mode Feedback/Ideas Survivor II: The Amazon Sengoku Mafia TL Mafia Community Thread
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread YouTube Thread European Politico-economics QA Mega-thread Things Aren’t Peaceful in Palestine
Fan Clubs
White-Ra Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
TL+ Announced Where to ask questions and add stream? The Automated Ban List
Blogs
I decided to write a webnov…
DjKniteX
Physical Exertion During Gam…
TrAiDoS
James Bond movies ranking - pa…
Topin
Thanks for the RSL
Hildegard
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1762 users

TL BW Userscript - Page 6

Forum Index > BW General
Post a Reply
Prev 1 4 5 6 7 8 9 Next All
b0lt
Profile Joined March 2009
United States790 Posts
August 25 2011 06:25 GMT
#101
I split up the main script into individual scripts for each feature, I've got them up at http://code.google.com/p/teamliquidbw/source/browse/ now. Also, I polished up WhuazGoodJaggah's stream filter script a bit


On August 25 2011 14:22 Cambium wrote:
To OP:

Instead of looping through all forms, you can simply refer to liquipedia via its XPath:


var bwlpXPath = "/html/body/table/tbody/tr/td/table[2]/tbody/tr/td[3]/table[4]/tbody/tr/td/form";
node = findXPathNode( bwlpXPath );
node.action = "h__p://wiki.teamliquid.net/starcraft/index.php";


Is this actually any faster than looping through all the forms? There are only like 3 forms on the page, and document.forms should be completely populated as soon as the DOM is ready, shouldn't it? Using XPath goes through the entire html file again, and I'm kinda leery of using it because it's a lot more fragile than just iterating through the forms. (I'm lazy and want to minimize the amount of time I spend maintaining stuff)
Cambium
Profile Blog Joined June 2004
United States16368 Posts
August 25 2011 07:04 GMT
#102
On August 25 2011 15:25 b0lt wrote:
I split up the main script into individual scripts for each feature, I've got them up at http://code.google.com/p/teamliquidbw/source/browse/ now. Also, I polished up WhuazGoodJaggah's stream filter script a bit


Show nested quote +
On August 25 2011 14:22 Cambium wrote:
To OP:

Instead of looping through all forms, you can simply refer to liquipedia via its XPath:


var bwlpXPath = "/html/body/table/tbody/tr/td/table[2]/tbody/tr/td[3]/table[4]/tbody/tr/td/form";
node = findXPathNode( bwlpXPath );
node.action = "h__p://wiki.teamliquid.net/starcraft/index.php";


Is this actually any faster than looping through all the forms? There are only like 3 forms on the page, and document.forms should be completely populated as soon as the DOM is ready, shouldn't it? Using XPath goes through the entire html file again, and I'm kinda leery of using it because it's a lot more fragile than just iterating through the forms. (I'm lazy and want to minimize the amount of time I spend maintaining stuff)


I didn't count the number of forms, but if you say there are three, then there definitely isn't an issue with speed.

You are right about the maintenance though, xpaths are a chore.
When you want something, all the universe conspires in helping you to achieve it.
Sawamura
Profile Blog Joined August 2010
Malaysia7602 Posts
August 25 2011 07:20 GMT
#103
putting your codes on google code is great but some people will not know how to download the script as when they click the link it doesn't allow them to download it instance and they have to right click raw file to download the specific file .
BW/KT Forever R.I.P KT.Violet dearly missed ..
WhuazGoodJaggah
Profile Blog Joined January 2009
Lesotho777 Posts
August 25 2011 08:16 GMT
#104
@b0lt

I made a patch for the streamlist thingy. http://code.google.com/p/teamliquidbw/issues/detail?id=1
The detection of the featured streams node is much better now (no more nextObject.firstChild.firstChild bullshit)
All streams are now filled in 1 array and therefore only 1 loop is needed to separate them into featured and non featured.
And a cosmetic change from . to •
small dicks have great firepower
writer22816
Profile Blog Joined September 2008
United States5775 Posts
August 25 2011 09:10 GMT
#105
Now if only it were possible to have Power Rank, TLFE and R&S back on the main page where they belong
8/4/12 never forget, never forgive.
kuroshiroi
Profile Joined November 2010
3149 Posts
August 25 2011 10:18 GMT
#106
On August 25 2011 18:10 writer22816 wrote:
Now if only it were possible to have Power Rank, TLFE and R&S back on the main page where they belong

It's possible but it would make the script kind of slow, since it'd have to scrape a few pages before it can add those things back in. Not to mention it would take a lot of work.
Fly Jaedong, fly!
Necosarius
Profile Blog Joined September 2009
Sweden4042 Posts
August 26 2011 20:55 GMT
#107
Wow I Have to use this O_O Thank you for doing this <3
quirinus
Profile Blog Joined May 2007
Croatia2489 Posts
August 26 2011 21:06 GMT
#108
On August 25 2011 19:18 kuroshiroi wrote:
Show nested quote +
On August 25 2011 18:10 writer22816 wrote:
Now if only it were possible to have Power Rank, TLFE and R&S back on the main page where they belong

It's possible but it would make the script kind of slow, since it'd have to scrape a few pages before it can add those things back in. Not to mention it would take a lot of work.


It'd be ok if it got PR asynchronous (if I remember correctly, js can handle that), but yea, it's a little bit more work.
All candles lit within him, and there was purity. | First auto-promoted BW LP editor.
PUPATREE
Profile Joined August 2009
340 Posts
August 27 2011 00:16 GMT
#109
That user streams script is fucking wonderful. Thank you.
ㅋㄲㅈㅁ
rift
Profile Blog Joined September 2007
1819 Posts
August 27 2011 23:09 GMT
#110
Can you replicate this script, which removes the SC2 forums entirely from the sidebar? https://chrome.google.com/webstore/detail/fchfgjknoimegjpgekahllojjfilcdno#
quirinus
Profile Blog Joined May 2007
Croatia2489 Posts
August 28 2011 00:14 GMT
#111
On August 28 2011 08:09 rift wrote:
Can you replicate this script, which removes the SC2 forums entirely from the sidebar? https://chrome.google.com/webstore/detail/fchfgjknoimegjpgekahllojjfilcdno#


http://www.teamliquid.net/forum/viewpost.php?post_id=11049981

just add:
remove_section(sc2);
with notepad.
All candles lit within him, and there was purity. | First auto-promoted BW LP editor.
fishbowl
Profile Joined January 2010
United States1575 Posts
August 28 2011 00:40 GMT
#112
You sir, are awesome. Thanks for the script.
Armathai
Profile Joined October 2007
1023 Posts
August 28 2011 06:17 GMT
#113
Can someone which file to edit to get the Replays section under the BW rather than over on the right?

I'd rather have them connected, works better in my mind :D

Looking for ArcticCerebrate formerly from @USEast
WhuazGoodJaggah
Profile Blog Joined January 2009
Lesotho777 Posts
August 28 2011 06:57 GMT
#114
edit the rearrange_forums.user.js

Search for:
/* Move replays to above poll */
move_section(replays, poll);

replace with:
/* Move replays below bw */
move_section(replays, bw);
move_section(bw, replays);
small dicks have great firepower
wishbones
Profile Blog Joined April 2009
Canada2600 Posts
Last Edited: 2011-08-28 07:27:37
August 28 2011 07:15 GMT
#115
is it just me or has the replay section disappeared for anyone else?

On August 28 2011 15:17 Armathai wrote:
Can someone which file to edit to get the Replays section under the BW rather than over on the right?

I'd rather have them connected, works better in my mind :D



oh thanks man it wasnt in the OP. HINT HINT
to me its actually better this way, no more going to the damn bottom of TL and then to the top and back down etc... i hate having to do that in the password entry area on profiles, at least this gives me a break.
joined TL.net in 2006 (aka GMer) - http://www.teamliquid.net/forum/viewmessage.php?topic_id=41944#2
WhuazGoodJaggah
Profile Blog Joined January 2009
Lesotho777 Posts
Last Edited: 2011-08-28 10:15:02
August 28 2011 10:10 GMT
#116
Submited another patch for these scripts: http://code.google.com/p/teamliquidbw/issues/detail?id=2

+ Show Spoiler +
Added another @exclude path (for the ad frame) (threw always an error)
Added SubSections
Added a count argument for nextObject and previousObject


Now it's possible to just remove certain sub sections, like Dota 2 or League of Legends.

You can get this version here or wait until b0lt updates the main repo.
small dicks have great firepower
b0lt
Profile Joined March 2009
United States790 Posts
Last Edited: 2011-08-29 21:53:21
August 29 2011 21:52 GMT
#117
On August 28 2011 19:10 WhuazGoodJaggah wrote:
Submited another patch for these scripts: http://code.google.com/p/teamliquidbw/issues/detail?id=2

+ Show Spoiler +
Added another @exclude path (for the ad frame) (threw always an error)
Added SubSections
Added a count argument for nextObject and previousObject


Now it's possible to just remove certain sub sections, like Dota 2 or League of Legends.

You can get this version here or wait until b0lt updates the main repo.


Merged this, also added power rank scraping while I was at it:

[image loading]
Wolf
Profile Blog Joined April 2010
Korea (South)3290 Posts
August 30 2011 08:16 GMT
#118
Going to try this again tonight most likely. Crossing my fingers!
Commentatorhttp://twitter.com/proxywolf
TL+ Member
kuroshiroi
Profile Joined November 2010
3149 Posts
August 30 2011 16:22 GMT
#119
The re-added PR works great, thanks a bunch

Also, bumpity bump.
Fly Jaedong, fly!
WhuazGoodJaggah
Profile Blog Joined January 2009
Lesotho777 Posts
August 31 2011 06:57 GMT
#120
there is a small bug in the Section code.

+ Show Spoiler +
function Section(id, count) {
this.elements = new Array();

var link = document.getElementById(id);
this.elements.push(link);
for (var x = 0; x < count; x++) {
this.elements.push(nextObject(link, x));
}
}
small dicks have great firepower
Prev 1 4 5 6 7 8 9 Next All
Please log in or register to reply.
Live Events Refresh
StarCraft2.fi
17:00
15V Cup / Playoffs Day 3
Reevou 8
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
IndyStarCraft 151
ProTech133
JuggernautJason109
Livibee 79
MindelVK 20
StarCraft: Brood War
Britney 22358
Dewaltoss 167
910 65
Hyun 64
HiyA 11
Dota 2
Gorgc7204
singsing2312
LuMiX1
League of Legends
rGuardiaN80
Heroes of the Storm
Liquid`Hasu342
Other Games
Grubby3200
B2W.Neo528
ArmadaUGS202
ToD162
Sick131
C9.Mang0113
ZombieGrub21
adren_tv16
Organizations
Other Games
BasetradeTV111
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 17 non-featured ]
StarCraft 2
• StrangeGG 81
• Kozan
• LaughNgamezSOOP
• sooper7s
• AfreecaTV YouTube
• intothetv
• Migwel
• IndyKCrew
StarCraft: Brood War
• FirePhoenix13
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• masondota2567
• WagamamaTV475
League of Legends
• Nemesis4381
Other Games
• imaqtpie3686
• Shiphtur130
Upcoming Events
Tenacious Turtle Tussle
3h 54m
The PondCast
13h 54m
WardiTV 2025
15h 54m
StarCraft2.fi
20h 54m
WardiTV 2025
1d 15h
RSL Revival
2 days
StarCraft2.fi
2 days
IPSL
2 days
Sziky vs JDConan
RSL Revival
3 days
Classic vs TBD
herO vs Zoun
WardiTV 2025
3 days
[ Show More ]
IPSL
3 days
Tarson vs DragOn
Wardi Open
4 days
Monday Night Weeklies
4 days
Replay Cast
5 days
Sparkling Tuna Cup
5 days
Liquipedia Results

Completed

Acropolis #4 - TS3
RSL Revival: Season 3
Kuram Kup

Ongoing

IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
YSL S2
BSL Season 21
Slon Tour Season 2
WardiTV 2025
META Madness #9
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
Big Gabe Cup #3
RSL Offline Finals
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.