MediaWiki:Mobile.js:修订间差异

勤求古训,博采众方
删除的内容 添加的内容
创建页面,内容为“→‎这里的任何JavaScript将为使用移动版网站的用户加载:​ →‎百度统计代码:​ <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?1d1f417946fa19c604c8a03880f407ed"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script>”
 
无编辑摘要
第1行: 第1行:
/* 这里的任何JavaScript将为使用移动版网站的用户加载 */
/* 这里的任何JavaScript将为使用移动版网站的用户加载 */

if(location.pathname === '/'){
history.replaceState({}, document.title, 'Index');
}


/* 百度统计代码 */
/* 百度统计代码 */
<script>
var _hmt = _hmt || [];
var _hmt = _hmt || [];
(function() {
(function() {
第10行: 第13行:
s.parentNode.insertBefore(hm, s);
s.parentNode.insertBefore(hm, s);
})();
})();

</script>
/* 百度自动推送 */
$(function(){
if (mw.config.get('wgNamespaceNumber', -1) !== -1 && mw.config.get('wgAction', null) === 'view' && !location.search.match(/oldid/)) {
$.getScript('https://zz.bdstatic.com/linksubmit/push.js');
}
$.getScript('https://sdk.51.la/js-sdk-pro.min.js', function(){
LA.init({
id: '',
ck: ''
});
});
});

2022年11月16日 (三) 11:50的版本

/* 这里的任何JavaScript将为使用移动版网站的用户加载 */

if(location.pathname === '/'){
	history.replaceState({}, document.title, 'Index');
}

/* 百度统计代码 */
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?1d1f417946fa19c604c8a03880f407ed";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();

/* 百度自动推送 */
$(function(){
	if (mw.config.get('wgNamespaceNumber', -1) !== -1 && mw.config.get('wgAction', null) === 'view' && !location.search.match(/oldid/)) {
		$.getScript('https://zz.bdstatic.com/linksubmit/push.js');
	}
	
	$.getScript('https://sdk.51.la/js-sdk-pro.min.js', function(){
		LA.init({
			id: '',
			ck: ''
		});
	});
});