❝ If you think of giving up, you gave up already. - Huang ZiTao ❞

Tutorial : Automatic Open New Tab
Friday, 12 July 2013 @ 20:58
Hi.

Ello. I am making a tutorial about the automatic open new tab thing. I don’t use this one because I think it mess with the PC I’m using. It crowds Chrome as well. But just in case if you guys wanted to use this for your blog.
For your information, this is for the simple template users only. I am going to post for the design template users in the future.

First thing first. Copy the code below:
<!-- code for turning all non-blog links to new page links -->
    <script type="text/javascript" language="javascript">
       var arr = document.getElementsByTagName("a");  //get all links in the page
       for(var i = 0; i < arr.length; i++)
       {
          if(arr[i].href.indexOf("Your URL") < 0 //not links that are 'inside' blog
             && arr[i].href.indexOf("javascript:") < 0) //not javascript links
             arr[i].target = "_blank"; 
       }
    </script>


P/S : Automatic open new tab means it will open a new tab when you click one link. 


Email

0 Comments:

Post a Comment








Home About Stuff eMail

I'm not the prettiest, but you know what? I'm fabulous. Hardcore EXO fangirl. I love reading all those stuffs.

LABEL
exo fangirl feelz

Contact
Here's the links to my social media sites. I'm not always the follow-me-follow-you-back type of person but notify me for a followback!

i'm friendly, of course.

Advertisements




made with love, ayemrawi
this is credit