[Greasemonkey] Replacing the head element
Lenny Domnitser
ldrhcp at gmail.com
Wed May 31 17:21:16 EDT 2006
On 5/31/06, Edward Kawas <edward.kawas at gmail.com> wrote:
> When I try to replace the element, nothing happens (i.e. the element isn't
> replaced if I look at the source). Weird thing is, if I use DOM inspector, the
> element has been modified (I can see the changes in the DOM).
>
> I have tried many things, but the last thing I have tried is the following:
> [...]
> var x = '<META HTTP-EQUIV="refresh" content="30">';
> [...]
Meta refresh is registered with the browser when the page loads, and
is not related to the DOM after it is initially read. This is a
problem if you are trying to remove a meta refresh, but if you only
want to add the behavior, you can use setTimeout, like so:
setTimeout(function() {
location.reload();
}, 30000);
More information about the Greasemonkey
mailing list