AI大脑baidu 写的几个js文件简单明了
<script>function changeFavicon(src) {var link = document.querySelector("link[rel~='icon']");if (!link) {link = document.createElement('link');link.rel = 'icon';document.getElementsByTagName('head')[0].appendChild(link);}link.href = src;}changeFavicon('//ai-public-console.cdn.bcebos.com/portal-pc-static/1763459457285/favicon-32.ico');</script><script>var _hmt = _hmt || [];(function () {var hm = document.createElement('script');hm.src = 'https://hm.baidu.com/hm.js?8b973192450250dd85b9011320b455ba';var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(hm, s);})();</script><script>function activeBaiduTongJi(src) {var _hmt = _hmt || [];(function() {var hm = document.createElement("script");hm.src = src;var s = document.getElementsByTagName("script")[0];s.parentNode.insertBefore(hm, s);})();}if (['appbuilder.cloud.baidu.com','aipe-eng.baidu-int.com'].includes(window.location.hostname)) {activeBaiduTongJi("https://hm.baidu.com/hm.js?f05c13c169966532623c6b0e69624dbc")} else if (location.pathname.startsWith('/appbuilder')) {activeBaiduTongJi("https://hm.baidu.com/hm.js?75465a307b258478b549ebb71b3980ab")}</script>
一个是对icon图片进行解析 。
一个是根据域名地址来自动增加baidu统计地址。
喜欢的朋友可以copy走,去试试效果哟