log("------------------------------- start: nya external link tracking -------------------------------"),_gaq.push(["_trackEvent","outbound-article",e(this).attr("href")]),u&&console.log("------------------------------- end: nya external link tracking -------------------------------")}),u&&e(this).css("border","1px solid red"))});if(u){console.log(window.location+" has \ntotal links: "+r.length+" \nexternal links: "+i.length);for(o=0;o<i.length;o+=1)console.log(i[o].href);console.log("-----------------------\nwhitelist:\n"),console.log(a)}return n}),define("social",["jquery","analytics"],function(e){"use strict";var t={};return t.init=function(e){var n=t,r="";r=n.initShareImage(),n.bindSocialButtons(e,r),n.analytics(e)},t.initShareImage=function(){var t=e(".fast-social").data("selected-image");return""===t&&(t=e('meta[property="og:image"]').attr("content"),(undefined===t||""===t)&&e("#content img").each(function(n){t=e(this).data("original");if(""!==t&&undefined!==t)return!1})),""!==t&&undefined!==t?(t=t.replace("-dev",""),t=t.replace("-demo",""),t=t.replace("-stage",""),t=t.replace("https","http"),t):(t="",t)},t.bindSocialButtons=function(n,r){var i=e(n).find(".share_facebook"),s=e(n).find(".share_twitter"),o=e(n).find(".share_googleplus"),u=e(n).find(".share_pinterest"),a=e(n).find(".share_sinaweibo"),f=e(n).find(".share_tencentweibo"),l=e(n).find(".share_vkontakt"),c=e(n).find(".share_qzone"),h=e(location).attr("href"),p=document.title,d=e("html").attr("lang"),v=d,m=e("meta[name=description]").attr("content");m=encodeURIComponent(m),v=v.substr(0,2),p=encodeURIComponent(p),h=h.replace("www-dev","www"),h=h.replace("www-demo","www"),h=h.replace("www-stage","www"),h=h.replace("https","http"),h=encodeURIComponent(h),e(i).on("click",function(e){var n="http://www.sonymobile.com/global-en/wp-content/themes/semc-main/close-popup.html",i="&picture="+r,s="https://www.facebook.com/dialog/feed?app_id=104230589647735&link="+h+"&name="+p+"&description="+m+"&display=popup&redirect_uri="+n+i;return t.popupwindow(s,"Facebook","580","400"),!1}),e(s).on("click",function(e){var n="https://twitter.com/intent/tweet?lang="+v+"&text="+p+"&url="+h;return t.popupwindow(n,"Twitter","550","260"),!1}),e(o).on("click",function(e){var n="https://plus.google.com/share?url="+h+"&hl="+d;return t.popupwindow(n,"GooglePlus","600","600"),!1}),e(l).on("click",function(e){var n="http://vkontakte.ru/share.php?url="+h;return t.popupwindow(n,"vkontakt","600","400"),!1}),e(a).on("click",function(e){var n="http://service.weibo.com/share/share.php?url="+h+"&title="+p+"&pic="+r+"&ralateUid=&language="+d;return t.popupwindow(n,"sinaweibo","600","600"),!1}),e(c).on("click",function(e){var n="http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url="+h+"&title="+p+"&pics="+r;return t.popupwindow(n,"qzone","600","400"),!1}),e(f).on("click",function(e){var n="http://v.t.qq.com/share/share.php?url="+h+"&title="+p;return t.popupwindow(n,"tencentweibo","600","400"),!1});if(""!==r&&undefined!==r){e(u).addClass("show");var g="http://pinterest.com/pin/create/button/?url="+h+"&media="+r+"&description="+m;e(u).on("click",function(){t.popupwindow(g,"Pinterest","600","600")})}},t.popupwindow=function(e,t,n,r){var i,s;return i=screen.width/2-n/2,s=screen.height/2-r/2,window.open(e,t,"scrollbars=yes, resizable=yes, width="+n+", height="+r+", top="+s+", left="+i+" ")},t.analytics=function(t){var n=e(t).find(".share_facebook"),r=e(t).find(".share_twitter"),i=e(t).find(".share_googleplus"),s=e(t).find(".share_pinterest"),o=e(t).find(".share_sinaweibo"),u=e(t).find(".share_tencentweibo"),a=e(t).find(".share_qzone"),f=e(location).attr("href");e(n).bind("click",function(e){_gaq.push(["_trackSocial","facebook","share",f])}),e(r).bind("click",function(e){_gaq.push(["_trackSocial","twitter","tweet",f])}),e(i).bind("click",function(e){_gaq.push(["_trackSocial","Google","share",f])}),e(s).bind("click",function(e){_gaq.push(["_trackSocial","Pinterest","pinned",f])}),e(o).bind("click",function(e){_gaq.push(["_trackSocial","Weibo","share",f])}),e(u).bind("click",function(e){_gaq.push(["_trackSocial","Tencent","share",f])}),e(a).bind("click",function(e){_gaq.push(["_trackSocial","Qzone","share",f])})},t}),define("json2",[],function(){typeof JSON!="object"&&(JSON={}),function(){"use strict";function f(e){return e<10?"0"+e:e}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return typeof t=="string"?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,r,i,s,o=gap,u,a=t[e];a&&typeof a=="object"&&typeof a.toJSON=="function"&&(a=a.toJSON(e)),typeof rep=="function"&&(a=rep.call(t,e,a));switch(typeof a){case"string":return quote(a);case"number":return isFinite(a)?String(a):"null";case"boolean":case"null":return String(a);case"object":if(!a)return"null";gap+=indent,u=[];if(Object.prototype.toString.apply(a)==="[object Array]"){s=a.length;for(n=0;n<s;n+=1)u[n]=str(n,a)||"null";return i=u.length===0?"[]":gap?"[\n"+gap+u.join(",\n"+gap)+"\n"+o+"]":"["+u.join(",")+"]",gap=o,i}if(rep&&typeof rep=="object"){s=rep.length;for(n=0;n<s;n+=1)typeof rep[n]=="string"&&(r=rep[n],i=str(r,a),i&&u.push(quote(r)+(gap?": ":":")+i))}else for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(i=str(r,a),i&&u.push(quote(r)+(gap?": ":":")+i));return i=u.length===0?"{}":gap?"{\n"+gap+u.join(",\n"+gap)+"\n"+o+"}":"{"+u.join(",")+"}",gap=o,i}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(e){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(e){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.

Prev | Next
Pg.: 1 ... 5 6 7 8 9 10 11


Back to home | File page

Subscribe | Register | Login | N