[Greasemonkey] RE: Greasemonkey Digest, Vol 9, Issue 87

Shawn Wilsher sdwilsh at umich.edu
Mon Aug 29 21:10:44 EDT 2005


Chris,

The smilies get changed on submit (a future change is to make it work on
preview too).  The GUID is because I use the Greasemonkey Compiler
(http://www.letitblog.com/greasemonkey-compiler/) to make this script into a
standalone extension so people don't need to install Greasemonkey if they
don't want to.  I just put the GUI in the script to make it easier for me to
find.

The bug does in fact duplicate everything.  I mean I could add checking to
not insert it if it already exists, but I shouldn't have to.  The problem
started last night when, like I said, their server was running very slow due
to high traffic volume.

As for the Userscript stuff, is there a standard for it?  As far as I could
tell it did not matter where it went, but it was recommended to put at the
beginning or the end.  Is there somewhere that states to put it in one
place?  If there is a standard I was unaware.

Thanks for the compliment on the interface.

It should be noted that I have not been able to reproduce the error either,
so it may have been an isolated incident.

Cheers,
Shawn

-----Original Message-----
Well, as I was afraid would happen, I installed the script and signed up for

an account and reloaded it over and over enabling and disabling the script 
and can't reproduce the duplication. Nice interface, by the way, though the 
smiley's were never swapped in for me. When's it supposed to happen, on 
preview or dynamically? Either way, looking at the script, I see a couple 
anomalies which probably don't matter (and I edited my own version but since

I was never getting the duplication in the first place, kinda a moote 
point). 1. Unless I missed a change, GM scripts don't need a GUID; the 
namespace suffices. 2. Though the function in question just parses the 
script with a regex, if I remember, so it wouldn't matter much, the 
//--Userscript/*--*///--/Userscript block is supposed to be at the top.

Looking through the script, I'm going to guess that the duplication happens 
to all the elements, instead of a single one, because they're all injected 
through that sandwiching (function() {} )();
Is this the case? Nothing else really jumps out at me......



More information about the Greasemonkey mailing list