Last.fm play statistics!

By david 2 Last update Sep 28, 2005 — Installed 4,697 times. Daily Installs: 0, 2, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 2, 0, 0

Archived Comments (locked)

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();

 
david 2 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