[Greasemonkey] My script kills firefox

Jeremy Dunck jdunck at gmail.com
Thu Mar 23 17:38:54 EST 2006


On 3/23/06, Olafur Arason <olafra at gmail.com> wrote:
> My script:
> http://hi.is/~olafura/fixveftivi.user.js
> I don't know if it is the totem firefox plugin, firefox or
> greasemonkey or just my stupid script.
> It's meant to fix a faulty Icelandic webpage that has a questionable
> object and embedded use, not that I'm a expert, but it shows up blank
> and I can hear sound but no music. With this script I can watch shows
> normally but it crashes firefox quite often.

This may not be related, but consider:
1) changing the script so that it replaces the embed after the load event
and:
2) uses the DOM's replace method instead of innerHTML.

So, replace writit with something like:
embed = ...
embed.setAttribute('foo', 'bar');
videoContent2 = document.getElementById('videoContent2');
videoContent2.parentNode.replaceChild(embed, videoContent2);


More information about the Greasemonkey mailing list