set home page
Added to the favorites
All articles(网络文学目录)
All Pictures(图片目录)
All Softwares(软件目录)
用于自动添加Digg,This!按钮的javascript_JavaScript技术_编程技术
Writer:
delv
Article type:
Programming skills(编程技巧)
Time:
2013/12/31 6:44:19
Browse times:
353
Comment times:
0
用于自动添加Digg,This!按钮的javascript_JavaScript技术_编程技术
Head photo
Go homepage
Upload pictures
Write articles
用于自动添加Digg This!按钮的javascript_JavaScript技术_编程技术-你的首页-uuhomepage.com
var main=document.getElementById("main");
var singlepost=false;
var firstpost;
var anchor;
for(var i=0;i
{
if(main.childNodes[i].className&&main.childNodes[i].className=="post")
{
var post=main.childNodes[i];
if(!firstpost)
{
firstpost=post;
}
for(var j=0;j
{
if(post.childNodes[j].className&&post.childNodes[j].className=="posthead")
{
var posthead=post.childNodes[j];
if(posthead.childNodes[1]&&posthead.childNodes[1].tagName&&posthead.childNodes[1].tagName=="H2")
{
if(posthead.childNodes[1].childNodes[1]&&posthead.childNodes[1].childNodes[1].tagName&&posthead.childNodes[1].childNodes[1].tagName=="A")
{
anchor=posthead.childNodes[1].childNodes[1];
}
else
{
anchor=posthead.childNodes[1].childNodes[0];
}
}
else
{
anchor=posthead.childNodes[0].childNodes[0];
}
anchor.style.fontSize="14pt";
if(anchor.className&&anchor.className=="singleposttitle")
{
singlepost=true;
}
}
}
}
}
if(singlepost)
{
var postfoot=document.createElement("div");
firstpost.appendChild(postfoot);
postfoot.className="postfoot";
postfoot.innerHTML="
http://del.icio.us/post?v=4&url="+encodeURIComponent(location.href)+"&title="+encodeURIComponent(document.title)+"\">
src=\http://del.icio.us/favicon.ico\ alt=\"Add to del.icio.us\" border=\"0\"/>
Add to del.icio.us
";
postfoot.innerHTML+="
http://digg.com/submit?phase=2&url="+encodeURIComponent(location.href)+"&title="+encodeURIComponent(document.title)+"\">
src=\http://digg.com/favicon.ico\ alt=\"Digg This!\" border=\"0\"/>
Digg This!
";
postfoot.innerHTML+="
http://www.facebook.com/share.php?u="+encodeURIComponent(location.href)+"\">
src=\http://www.facebook.com/favicon.ico\ alt=\"Share on Facebook\" border=\"0\"/>
Share on Facebook
";
postfoot.innerHTML+="
http://www.google.com/bookmarks/mark?op=edit&bkmk="+encodeURIComponent(location.href)+"&title="+encodeURIComponent(document.title)+"\">
src=\http://www.google.com/favicon.ico\ alt=\"Google Bookmark This\" border=\"0\"/>
Google Bookmark This
";
}
There are 0 records,
Comment:
Must be registered users to comment(必须是注册用户才能发表评论)
Comments can't is empty(评论不能为空)
Disclaimer
Privacy Policy
About us
Site Map
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.