|
Hiyo~ Long story short, I recently found out about Autopager firefox addon and am trying to get it to work with TL. Unfortunately I have zero XPath experience, so here's where you guys come in =D
Autopager is basically an addon that, for multi-page websites, lets you scroll down to the bottom, and automatically load the next page as part of current html, so you essentially get infinite scrolling (kind of like the All link but on-demand)
To do this it needs 2 things: the url pattern and what to load. The second part is easy, the first one I'm having trouble with..
Here's the default script it presents me with
//a[@title='Next Page (2)' and (text()='Next')] It basically looks for a link whose Alt Text is Next Page (2) and text is Next and is a subset of http://www.teamliquid.net/forum/viewmessage.php? This works well for the first page and doesn't work for any other page, because the Alt Txt becomes Next Page (3) for the second page, Next Page (4) for the third page, etc
I'm trying to use the starts-with function so that it essentially works like "@title starts-with 'Next Page' and text is Next" but can't figure it out. I got something like
//a[starts-with(@title, 'Next Page') and (text()='Next')] but it's not working because I think it doesn't link @title to the link.. not sure.
Any experts here? =D
+ Show Spoiler +Alternatively maybe those Alt Txts could just be changed to say Next Page? ^_^
|
|
hey jeejee, i can't really help you with this, but if i know one thing for certain, it's that your name is jeejee.
|
hey hey my name is geegee1 LOLOL
|
|
wow are you fucking serious ze?
|
Maybe try 'Next Page (*)'?
|
Bob is such a silly silly person ze
|
Keep the trash in the dota thread ze
|
This works:
//a[text() = 'Next' and contains(@title, 'Next Page')]
A bit more thorough:
//a[text() = 'Next' and contains(@title, 'Next Page') and contains(@href, 'viewmessage')]
|
On December 08 2009 13:03 SonuvBob wrote: Maybe try 'Next Page (*)'?
the quotes seem to be treating it as a literal asterisk rather than a regex symbol i tried \* and then i tried separating .. made a typo and it worked
//a[@title='Next Page ('=*+')' and (text()='Next')]
no idea why this works. i meant to put +'s on both sides, but that doesn't work. oh well whatever, problem fixed =D
but onmach's solution is cleaner and i'll be using that instead tyvm ^_^
|
WHERE'S THE SUP BACK JEEJEE, WHERE IS IT ZE?
|
This is an awesome extension, by the way. Thanks for the tip.
|
oh why the devil are blogs coded differently good thing it's just one extra line <3
and @ dota guys this isn't the dota thread, i believe there are standards on TL re: posting outside that thread and i'm still shinbi you jerkwads.
|
Then why is charliemurphy able to post ze
|
|
I had to tweak a few things to get it to work just right.
For url pattern, enable regexp and use this:
http://www.teamliquid.net/(forum|blogs)/view(message|blog)\.php.*
For link xpath:
//a[text() = 'Next' and contains(@title, 'Next Page') and contains(@href, 'view')]
For content xpath:
//td[@valign="top"]//table[@width=600]
Sure makes following the fitness thread easier.
|
On December 08 2009 13:41 Elemenope wrote:Then why is charliemurphy able to post ze He's only able to post about half the time :p
|
random followup question (probably @onmach ) currently my next page loads at the top of my current one rather than the bottom -- any way to change this? (i.e. not make it load the next page until i've reached the bottom of the current one) i've tried experimenting with "paging when space is less than X window heights" but that option doesn't seem to do anything at all >.>
|
On December 08 2009 14:26 SonuvBob wrote:Show nested quote +On December 08 2009 13:41 Elemenope wrote:Then why is charliemurphy able to post ze He's only able to post about half the time :p
Ha ha ha. So true too, lol.
|
|
|
|