Hi people, I have just a little problem in here.

I have a webpage, which I don't have access to the files, so I have to
modify it via greasemonkey. The problem is that EVERY link of the page
has target="_new" and I need to replace that by target="_self".

So far, I came up this but I can't manage to make it work.

// ==UserScript==
// @name           CUBO iframe
// @include        http://cavcity.com/cube/#
// ==/UserScript==

(function () {
        var external = document.links;
        for (var k=0; k<external.length; k++)
        if (external[k].href && external[k].target=="_new")
        external[k].target = "_self";
})();

I don't know WHY, but the links still opens in new tab/window
depending on the browser.
Can someone give me a hand here?

Thanks very much,
Kevin

-- 
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en.

Reply via email to