• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 16:29
CEST 22:29
KST 05:29
  • 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
TL.net Map Contest #21: Voting10[ASL20] Ro4 Preview: Descent11Team TLMC #5: Winners Announced!3[ASL20] Ro8 Preview Pt2: Holding On9Maestros of the Game: Live Finals Preview (RO4)5
Community News
BSL Team A vs Koreans - Sat-Sun 16:00 CET6Weekly Cups (Oct 6-12): Four star herO85.0.15 Patch Balance Hotfix (2025-10-8)80Weekly Cups (Sept 29-Oct 5): MaxPax triples up3PartinG joins SteamerZone, returns to SC2 competition32
StarCraft 2
General
Revisiting the game after10 years and wow it's bad The New Patch Killed Mech! TL.net Map Contest #21: Voting Stellar Fest: StarCraft II returns to Canada herO Talks: Poor Performance at EWC and more...
Tourneys
SC2's Safe House 2 - October 18 & 19 Sparkling Tuna Cup - Weekly Open Tournament $1,200 WardiTV October (Oct 21st-31st) WardiTV Mondays RSL Offline Finals Dates + Ticket Sales!
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 496 Endless Infection Mutation # 495 Rest In Peace Mutation # 494 Unstable Environment Mutation # 493 Quick Killers
Brood War
General
BW General Discussion BSL Season 21 BGH Auto Balance -> http://bghmmr.eu/ BW caster Sayle BSL Team A vs Koreans - Sat-Sun 16:00 CET
Tourneys
[ASL20] Semifinal B [Megathread] Daily Proleagues SC4ALL $1,500 Open Bracket LAN [ASL20] Semifinal A
Strategy
Current Meta BW - ajfirecracker Strategy & Training Relatively freeroll strategies Siegecraft - a new perspective
Other Games
General Games
Stormgate/Frost Giant Megathread Dawn of War IV Path of Exile Nintendo Switch Thread ZeroSpace Megathread
Dota 2
Official 'what is Dota anymore' discussion LiquidDota to reintegrate into TL.net
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
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine Men's Fashion Thread Sex and weight loss
Fan Clubs
The herO Fan Club! The Happy Fan Club!
Media & Entertainment
Series you have seen recently... Anime Discussion Thread [Manga] One Piece Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion MLB/Baseball 2023 NBA General Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
The Heroism of Pepe the Fro…
Peanutsc
Rocket League: Traits, Abili…
TrAiDoS
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1507 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
IPSL
19:00
Ro24 Group D
Sziky vs Havi
Artosis vs Klauso
Airneanach51
Liquipedia
Safe House 2
17:00
Playoffs
TriGGeR vs Cham
Astrea vs TBD
ZombieGrub962
TKL 324
3DClanTV 83
EnkiAlexander 83
CosmosSc2 79
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
ZombieGrub962
TKL 324
CosmosSc2 79
ProTech76
JuggernautJason67
Railgan 26
StarCraft: Brood War
Larva 861
Barracks 294
Dewaltoss 146
Hyun 127
Mong 51
NaDa 29
scan(afreeca) 12
Counter-Strike
fl0m2861
Stewie2K456
Heroes of the Storm
Liquid`Hasu542
Khaldor483
Other Games
Grubby2421
ScreaM1499
Pyrionflax215
ArmadaUGS123
Organizations
Other Games
gamesdonequick3287
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 15 non-featured ]
StarCraft 2
• Adnapsc2 15
• Migwel
• AfreecaTV YouTube
• intothetv
• sooper7s
• Kozan
• IndyKCrew
• LaughNgamezSOOP
StarCraft: Brood War
• blackmanpl 24
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• Ler64
Other Games
• imaqtpie2552
• Shiphtur161
Upcoming Events
Replay Cast
13h 31m
Monday Night Weeklies
19h 31m
WardiTV Invitational
1d 14h
WardiTV Invitational
1d 18h
Tenacious Turtle Tussle
3 days
The PondCast
3 days
WardiTV Invitational
4 days
Online Event
4 days
RSL Revival
5 days
RSL Revival
5 days
[ Show More ]
WardiTV Invitational
5 days
Afreeca Starleague
6 days
Snow vs Soma
Sparkling Tuna Cup
6 days
WardiTV Invitational
6 days
RSL Revival
6 days
Liquipedia Results

Completed

Acropolis #4 - TS2
WardiTV TLMC #15
HCC Europe

Ongoing

BSL 21 Points
ASL Season 20
CSL 2025 AUTUMN (S18)
C-Race Season 1
IPSL Winter 2025-26
EC S1
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual

Upcoming

SC4ALL: Brood War
BSL Season 21
BSL 21 Team A
BSL 21 Non-Korean Championship
RSL Offline Finals
RSL Revival: Season 3
Stellar Fest
SC4ALL: StarCraft II
CranK Gathers Season 2: SC II Pro Teams
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 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.