Last.fm play statistics!

By DavidV Last update Jun 4, 2010 — Installed 5,492 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 8 posts, 8 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
Stephen Paulger Scriptwright

http://userscripts.org/scripts/show/2252 The site was update today it seems. I fixed the script.

 
Arvid Scriptwright

Thanks for fixing my script david!

 
Golanlan Scriptwright

cool :}

 
Andrew Wilki... Scriptwright

Below is a patch that makes the script use the 'stats reset on' date if available.

--- 1843.user.js 2005-10-17 13:41:28.000000000 +0100
+++ stats.user.js 2005-10-17 13:38:53.000000000 +0100
@@ -70,7 +70,11 @@
if (!tracksplayed)
return;

-var reg_date = panel.getElementsByTagName("p")[0].innerHTML.match(/Registered on (.*)/)[1];
+var reg_date_match = panel.getElementsByTagName("p")[0].innerHTML.match(/Stats reset on (.*)/);
+if(!reg_date_match) {
+ var reg_date_match = panel.getElementsByTagName("p")[0].innerHTML.match(/Registered on (.*)/);
+}
+var reg_date = reg_date_match[1];
var reg_date_ms = Date.parse(reg_date);
var now = new Date();

 
DavidV Script's Author

You're welcome.
I just changed the expression that searches for "registered" date. I'm not sure if the HTML change or if anything else caused the bug, though.

 
TS2Master User

Brilliant thanks a lot!

 
Xon Scriptwright

Thanks a lot David. Works great. What was wrong with it?

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel