[Slogger] Trouble With Variable "$url"

Ken Schutte kschutte at mit.edu
Fri Feb 17 15:14:24 EST 2006


Hmm... I just tried it and it works for me.

I'm using a little bit newer version, which had some slight changes in 
when the javascript is executed.  The last thing I could suggest is to 
try this one
http://www.kenschutte.com/download/slogger/xpi/slogger-0.6.20060216.xpi
(and have "start of log process" checked in custom script tab - it's a 
new option)

(keep in mind the warning on my website about upgrades...)

Ken


mook at themook.net wrote:
> Unfortunately I'm not sure this is workaround-able...I put in the 
> code you posted, hit "OK", hit the Slogger Button 1 (which is set 
> to run this profile) ... and nothing saved.
> 
> I went back to the profile, checked the 'Custom Script' tab, and 
> as you said the code had removed the doubleslashes - so I 
> recopied and repasted your code, and added an 'alert(a);' line so 
> I could test the code.  When I clicked 'Test' the alert box 
> appeared, AND the URL looked perfect - no "?", no ":", and no 
> "/".  
> 
> So, it seems to work when testing from the Custom Scripts tab - 
> but when actually archiving a page, it still doesn't fire, no joy.  
> 
> Mook
> http://www.themook.net
> 
> On 16 Feb 2006 at 21:36, Ken Schutte wrote:
> 
>>Ahh, yeah you picked up on a couple mistakes,  the "a.replace()" returns 
>>the new string, instead of modifying "a".  The other problem is with 
>>escaping special characters, and is pretty confusing.  Put this as the 
>>script:
>>
>>var a = sloggerGetVar("url");
>>a = a.replace(/\\\:/g, "_");
>>a = a.replace(/\\\?/g, "_");
>>a = a.replace(/\\\//g, "_");
>>sloggerSetVar("url",a);
>>
>>This should work, ... BUT if you ever modify that profile again (i.e. 
>>Edit Profile and hit OK), it you'll notice the extra pair "\\" missing 
>>in each line, and you'd have to add them back again.  Yeah, this is a 
>>delicate hack, but should work for now...
>>
>>Ken
> 
> 
> 
> 
> _______________________________________________
> Slogger mailing list
> Slogger at mozdev.org
> http://mozdev.org/mailman/listinfo/slogger


More information about the Slogger mailing list