Re. replacing the onClick handler, I'm ahead of you there

(see my earlier post).
As I said, I can remove the onClick with jQuery, and replace it with my own slightly tweaked version of the newAlbum function, but the problem would then be the XSRFToken argument that gets sent to launchScript when it's called by newAlbum(). I presume this is generated and written into the document head by PHP at runtime, and my newAlbum replacement isn't going to be able to get hold of this string, unless I find some way of parsing the raw page source for the value of XSRFToken or some similarly horrible hack…
I thought about trying to override the value of the album var that receives the result of the prompt, but it's scoped inside the newAlbum() function, so this isn't going to work, I think.
a|x