瀏覽代碼

add ip2addr

dotos 9 年之前
父節點
當前提交
d008b13114
共有 1 個文件被更改,包括 7 次插入5 次删除
  1. 7 5
      views/welcome.pug

+ 7 - 5
views/welcome.pug

@@ -28,11 +28,13 @@ block content
 			init();
 			animate();
 			//- baidu Analytics
-			var _hmt = _hmt || [];
-			var hm = document.createElement("script");
-			hm.src = "//hm.baidu.com/hm.js?99d1e1ee6b085485bc6ec3e23b821b49";
-			var s = document.getElementsByTagName("script")[0]; 
-			s.parentNode.insertBefore(hm, s);
+			if(!/^http:\/\/localhost/.test(location.href)){
+				var _hmt = _hmt || [];
+				var hm = document.createElement("script");
+				hm.src = "//hm.baidu.com/hm.js?99d1e1ee6b085485bc6ec3e23b821b49";
+				var s = document.getElementsByTagName("script")[0]; 
+				s.parentNode.insertBefore(hm, s);
+			}
 		};
 
 		function init() {