Tuesday

Open external links in a new page on Blogger




Here we can use a script thta will make every external link to open in a new page.
  1. Go to the “Template” tab, also called “Layout” from the desktop, and then go to “Edit HTML”.
  2. Layout Blogger
  3. Search the following text:
  4. ]]></b:skin>
    and just after this paste the following:
    <script language='javascript'>
    var dominio = "www.yourblog.blogspot.com";
    var dominio1 = "yourblog.blogspot.com";
    var script = "javascript:void(0);";
    var imagenesblogger0 = "bp0.blogger.com";
    var imagenesblogger1 = "bp1.blogger.com";
    var imagenesblogger2 = "bp2.blogger.com";
    var imagenesblogger3 = "bp3.blogger.com";
    var blogger1 = "www.blogger.com";
    var blogger2 = "www2.blogger.com";
    var publicidad = "pagead2.googlesyndication.com";
    function LinksExternos() {
    var Externo;
    if (document.getElementsByTagName('a')) {
    for (var i = 0; (Externo = document.getElementsByTagName('a')[i]); i++) {
    if (
    Externo.href.indexOf(dominio) == -1 &amp;&amp;
    Externo.href.indexOf(dominio1) == -1 &amp;&amp;
    Externo.href.indexOf(script) == -1 &amp;&amp;
    Externo.href.indexOf(imagenesblogger0) == -1 &amp;&amp;
    Externo.href.indexOf(imagenesblogger1) == -1 &amp;&amp;
    Externo.href.indexOf(imagenesblogger2) == -1 &amp;&amp;
    Externo.href.indexOf(imagenesblogger3) == -1 &amp;&amp;
    Externo.href.indexOf(publicidad) == -1 &amp;&amp;
    Externo.href.indexOf(blogger1) == -1 &amp;&amp;
    Externo.href.indexOf(blogger2) == -1
    )
    {
    Externo.setAttribute('target', '_blank');
    //Externo.setAttribute('class', 'linkexterno');
    }
    }
    }
    }
    window.onload = function() {
    LinksExternos();
    }
    </script>
  5. In the last code, replace www.yourblog.blogspot.com and yourblog.blogspot.com for your blog’s address, and that’s it.

    This Article from here  http://blog.btemplates.com/open-external-links-in-a-new-page-on-blogger/

About the Author

I'm AlQadib, the founder of Blog Walker (BW). I'm a freelance writer on topics related to Website Optimization (SEO), blogger customizations and making money online. I'm blogging since 2011 and I'm currently a guest blogger on Blogging With Success.
Follow Me on Facebook [at] Facebook



Subscribe to this Blog via Email:

Click here to Subscribe to FREE email updates from "iBlog Walker", so that you do not miss out anything that can be valuable to you and your blog!!

Blog Trick

 

© 2011 iBlog Walker | Hosted By Blogspot - Designed by Fajar Priyadi - Supported by Ana | Sitemap |

Blogger Tutorials | Blogger Tips | Blogger Trick | Bisnis Online PPC

GUESTBOOK