Extract Information from battlelog - Better Battlelog Forums #67063

Post edited 1 x times, last by
Hi, it's me again :)

i have another question: How is it possible to extract information
out of the battlelog site or out of an url on the page?

I want to expand my plugin, but i need the username as a variable,
or i won't get it to work.

Can anyone tell me how to do this?

Thanks in advance

This is the section in the HTML source code where the username is stored (on every page)
<li data-track="header.stats.overview" class="bubble-title-inner base-header-extralink" data-page="stats" data-tooltip="Stats">
<a href="/bf3/en/soldier/GosuSan/stats/200934537/">
<span class="base-header-extralink-icon stats"></span>
What will this plugin do?
Well, moved this to the webcoding forum because it's not a plugin questions, it's a general coding question.
Post edited 1 x times, last by

It will replace the big COOP-Button on the home page with several, not directly reachable sites
such as Favourites, Friends, etc. But only if i get it to work of course :)

Code for extracting username:

//get html
var link = $('li[data-page="stats"]').html();
//matches everythin between /soldier/ and /stats/
var matches = link.match('\/soldier\/(.*)\/stats\/');