curProtocol = window.location.protocol.split(':')[0]; ! b( |) {3 d' B2 ?* M! O- J) r
} 8 D5 F2 x, r! s& q( o' z0 [
else{ * }4 G. F4 o1 Z
curProtocol = canonicalURL.split(':')[0]; - m1 v, D% h3 p$ r. R
} 0 s$ p$ T$ I5 w0 m) m
//Get current URL if the canonical URL does not exist D" [. G' y! d5 I- s
if (!canonicalURL) canonicalURL = window.location.href;$ \4 j+ V( y) M* {: i
//Assign script content. Replace current URL with the canonical URL5 J5 x' L) v! [& f; w
!function(){var e=/([http|https]:\/\/[a-zA-Z0-9\_\.]+\.baidu\.com)/gi,r=canonicalURL,t=document.referrer;if(!e.test(r)){var n=(String(curProtocol).toLowerCase() === 'https')?"https://sp0.baidu.com/9_Q4simg2RQJ8t7jm9iCKT-xh_/s.gif":"//api.share.baidu.com/s.gif";t?(n+="?r="+encodeURIComponent(document.referrer),r&&(n+="&l="+r)):r&&(n+="?l="+r);var i=new Image;i.src=n}}(window);})();- G N r7 g6 n: m; r