$.fn.QiLuShare = function (title, proptext, url) { var proptext_kaixin = proptext + url; var share = new Array(); share["qqs"] = "http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=" + url + (url.indexOf('?') > -1 ? '&title=' : '?title=') + title; share["weibo"] = "javascript:void((function(s,d,e,r,l,p,t,z,c){var f='http://service.weibo.com/share/share.php?appkey=696316965&',u=z||d.location,p=['url=',e(u),'&title=',e(t||d.title),'&source=',e(r),'&sourceUrl=',e(l),'&content=',c||'gb2312','&pic=',e(p||'')].join('');function a(){if(!window.open([f,p].join(''),'mb',['toolbar=0,status=0,resizable=1,width=440,height=430,left=',(s.width-440)/2,',top=',(s.height-430)/2].join('')))u.href=[f,p].join('');};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else a();})(screen,document,encodeURIComponent,'www.95538.cn','https://www.95538.cn','',proptext,url,'gb2312'));"; share["qqt"] = "javascript:void(window.open('http://v.t.qq.com/share/share.php?title='+encodeURI(proptext)+'&url='+encodeURIComponent(window.location)+'&appkey=a75e1c5904c842b7b3aed10213379cca&site=www.95538.cn&','转播到腾讯微博', 'width=700, height=680, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, location=yes, resizable=no, status=no'));"; share["renren"] = "javascript:void((function(s,d,e){if(/xiaonei\.com/.test(d.location))return;var f='http://share.xiaonei.com/share/buttonshare.do?link=',u=d.location,l=d.title,p=[e(u),'&title=',e(l)].join('');function a(){if(!window.open([f,p].join(''),'xnshare',['toolbar=0,status=0,resizable=1,width=626,height=436,left=',(s.width-626)/2,',top=',(s.height-436)/2].join('')))u.href=[f,p].join('');};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else a();})(screen,document,encodeURIComponent));"; share["kaixin"] = "javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(kaixin=window.open('http://www.kaixin001.com/~repaste/repaste.php?&rurl='+escape(d.location.href)+'&rtitle='+escape('" + title + "')+'&rcontent='+escape('" + proptext_kaixin + "'),'kaixin'));kaixin.focus();"; share["douban"] = "javascript:void(function(){var d=document,e=encodeURIComponent,s1=window.getSelection,s2=d.getSelection,s3=d.selection,s=s1?s1():s2?s2():s3?s3.createRange().text:'',r='http://www.douban.com/recommend/?url='+e(d.location.href)+'&title=" + proptext + "&sel='+e(s)+'&v=1',w=450,h=330,x=function(){if(!window.open(r,'douban','toolbar=0,resizable=1,scrollbars=yes,status=1,width='+w+',height='+h+',left='+(screen.width-w)/2+',top='+(screen.height-h)/2))location.href=r+'&r=1'};if(/Firefox/.test(navigator.userAgent)){setTimeout(x,0)}else{x()}})()"; $(this).bind('click', function (e) { $e = $(e.target); var sharevalue = $e.attr('share-value'); if (sharevalue) { switch (sharevalue) { case 'qqs': window.open(share["qqs"]); break; case 'weibo': eval(share["weibo"]); break; case 'qqt': eval(share["qqt"]); break; case 'renren': eval(share["renren"]); break; case 'kaixin': eval(share["kaixin"]); break; case 'douban': eval(share["douban"]); break; } } }); }