HackingUniversity - Hacks . Tricks . How-To's

06 February 2013

Automatically Open Blogger Comment Links in New Tab

Commenting is usually the best place for spamming your links and sniffing out the link juice, but now webmasters are aware about this thing and they normally have rel nofollow and moderation enabled on their blogs that makes it little difficult for anyone to spam out.

But still people search for more ways to enhance their commenting security so we posted about automatically removing links from your blogger comments or just transforming them into simple text lines, well that solves the problem but if you do not wish to do that you can even add this little tweak to open all the links in new tab, so that anyone clicks that link will take them to that website in a new tab so your website will be still open so he can come anytime back to your website.

So now this can be done by just adding a simple line <base target='_blank'/> right above your </head> tag. But remember this will open all links on your website in new tab, so its not recommended but still you can use.

Open Blogger Comments Links in New Tab

So now if you just need to open links present in your blogger comments then below script would work pretty well, so just install it out.

  1. Visit Blogger > Template > Edit HTML.
  2. Now press Ctrl + F and search for </body> tag and paste below script above it.

    <script src='http://code.jquery.com/jquery-latest.js'/>
    <script type='text/javascript'> jQuery (document). ready (function ($){$ ('. comments. comments-content. user a'). click (function (){window. open (this.href);return false;});});</script>

  3. So now you can remove that red line if you already have it, now Save Template.
  4. So now you can refresh your blog and see if this tweak is working.