Tutorial : Automatic Open Link In New Tab
Assalamualaikum ♥
Tutorial ni sesuai kalau korang buat
disable right click kat blog korang.
1. Dashboard > Design > Page Elements > Add a Gadget > HTML/JavScript
2. Paste this in the box :
<!-- 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>
3. Save.
P/S : Tak payah tukar apa-apa dalam code tu, okey. Btw, credits to Nina.
Labels: Tutorial
Tutorial : Automatic Open Link In New Tab
Assalamualaikum ♥
Tutorial ni sesuai kalau korang buat
disable right click kat blog korang.
1. Dashboard > Design > Page Elements > Add a Gadget > HTML/JavScript
2. Paste this in the box :
<!-- 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>
3. Save.
P/S : Tak payah tukar apa-apa dalam code tu, okey. Btw, credits to Nina.
Labels: Tutorial
Profile
The Girl Behind The Laptop
★ In short, I am :
• A malay muslim.
• Lives in Terengganu, studies in Selangor.
★ Bloggie :
• Created since 24 November 2009, five days after celebrating my 10th birthday.
• Created by
Ummi because I was interested in blogging when I saw she's updating her blog.
• Sesuci Kejora has been here for almost 11 years. Big applause :')