Open in New Window Plugin

I submitted by “Open in New Window Plugin” to the wrodpress repository today.

The Open in New Window Plugin Plugin uses JavaScript to target external links to a new browser window, leaving your blog page open. Since it uses javascript, it targets more links than using a plugin that filter pages and rewrite the link.

Due to the limitations of  javascript it will not be able target links in iframes such as Adsense and some other affiliate links.

I could have just placed the javascript into the footer directly, but this is a very convenient way to manage it.

8 Responses to “Open in New Window Plugin”

  1. Sally says:

    This plugin works a treat on my site. Thanks. Very grateful as have been waiting for a plugin like this for a while. Using it on a test-site running IE 7.

  2. Keith says:

    You English is very good.

  3. DXJ says:

    I am sorry.I tested it again And it works normally.My IE’s version is 6.0.

    My English is so poor,can you understand what I say?

  4. Keith says:

    I just tested in firefox and IE – both ways and they both work with javascript and external link. Even without the try/catch they do not throw any errors.

    I have older versions of IE at work and I will try there.

  5. Keith says:

    I don’t see how it could make a difference. I tested it under Firefox, but I don’t have IE set for testing on my home machine. My work machine will help me debug this on Monday.

    It could be that the page was cached? I doubt it, but try a refresh and see.

    I will run it now with the try/catch removed and see it it throws an error.

  6. DXJ says:

    I have updated to V1.2. But it does not works.

    but I change

    if ((b[i].hostname != location.hostname) && (b[i].protocol != “javascript:”))

    to

    if (b[i].hostname != location.hostname && b[i].protocol != “javascript:”)

    It works again.I don’t know why,I am amateur on website.

  7. Keith says:

    Very good! I will make the change on Monday.

    Keith

  8. DXJ says:

    hello,I am from china.I can speak a little English.I am using this plugin now.It’s useful.But I think there are some sentence must be changed.

    if (b[i].hostname != location.hostname) {

    change to

    if (b[i].hostname != location.hostname && b[i].protocol != “javascript:”) {

    because my website have some javascript sentence,it would be broke down.

Leave a Reply