[Greasemonkey] OOPy GM script seems to crash Firefox
Aaron Boodman
zboogs at gmail.com
Mon Jun 20 14:39:06 EDT 2005
Hey, don't take it badly. I didn't look at it more because I was busy
than you did something wrong.
If you can nail it down to a specific few lines that seem to cause the
crash, that would help.
On 6/20/05, Dan Phiffer <dan at phiffer.org> wrote:
> List,
>
> Re-reading my posts from earlier, I see some flaws:
>
> 1. I wasn't clear about what I was asking for
> 2. I haven't explored all my avenues for debugging yet, I wouldn't
> expect you to do that for me
> 3. This is probably more of a question for a JavaScript oriented
> discussion, and is not necessarily GM-specific
>
> Please excuse my awkward entrance, I plan on spending some time
> around here as I do more GM hacking.
>
> Best,
> -Dan
>
>
> On Jun 19, 2005, at 2:01 PM, Dan Phiffer wrote:
>
> > One other thing that's worth mentioning is that I've switched from
> > using something like this:
> >
> > var frame_array[n] = markup_text;
> > ...
> > animate_content.innerHTML = frame_array[n];
> >
> > To something like this:
> >
> > var frame = document.createElement('div');
> > frame.innerHTML = markup_text;
> > ...
> > old_frame.style.display = 'none';
> > new_frame.style.display = 'block';
> >
> > This seems to reduce the flicker between frames, but could be
> > another culprit for the crashing.
> >
> > Thanks,
> > -Dan
> >
> > On Jun 19, 2005, at 1:32 PM, Dan Phiffer wrote:
> >
> >
> >> Hi list,
> >>
> >> This is my first post and I'm kind of new to Greasemonkey, but I
> >> think I've learned quite a bit in the short time I've spent with
> >> it. Anyway, I'm working on a script to animate the changes made to
> >> a MediaWiki article over time. So far it's been coming along
> >> pretty well, but recently I did a bunch of refactoring to make the
> >> code more manageable. This refactoring seems to have broken
> >> something badly.
> >>
> >> Here is the last working script:
> >> http://phiffer.org/projects/wikipedia-animate/
> >>
> >> And the newer, more broken version:
> >> http://phiffer.org/projects/wikipedia-animate/?v=0.6
> >>
> >> en.wikipedia.org is dead from where I'm sitting, so I've been
> >> testing on wiki.43folders.com
> >>
> >> One big change was I switched from a weird persistence-paranoid
> >> style of functions (document.my_func = function() { ... }) to
> >> something a bit more familiar (my_object.prototype.my_func =
> >> function() { ... }). I could be wrong about this (there were some
> >> other changes along the way), but these changes seem to have led
> >> to a Greasemonkey script more prone to crashing Firefox.
> >>
> >> For instance, using the new script at http://wiki.43folders.com/
> >> index.php?title=Main_Page&action=history I've observed the
> >> following behaviors:
> >>
> >> 1. Default settings (last two revisions, etc.) -- crash
> >> 2. Default + animate over all versions -- works
> >> 3. Default + animate over all versions + skip minor revisions --
> >> simply breaks
> >>
> >> Each of these permutations (I think) work fine in the older version.
> >>
> >> Another thing that's worth mentioning is that this is a script
> >> that is being entered in a contest over at waxy.org, so I'll
> >> understand if some of you are reluctant to help before Tuesday :)
> >>
> >> Thanks for any tips, and sorry if I'm missing something obvious...
> >>
> >> -Dan
> >> _______________________________________________
> >> Greasemonkey mailing list
> >> Greasemonkey at mozdev.org
> >> http://mozdev.org/mailman/listinfo/greasemonkey
> >>
> >>
> >
> > _______________________________________________
> > Greasemonkey mailing list
> > Greasemonkey at mozdev.org
> > http://mozdev.org/mailman/listinfo/greasemonkey
> >
>
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey
>
More information about the Greasemonkey
mailing list