MediaWiki: Common.js:修订间差异
来自帮助文档
无编辑摘要 |
无编辑摘要 |
||
第1行: | 第1行: | ||
/* 这里的任何JavaScript将为所有用户在每次页面载入时加载。 */ | /* 这里的任何JavaScript将为所有用户在每次页面载入时加载。 */ | ||
/* 重写首页代码 */ | /* 重写首页代码 */ | ||
if (mw.config.get('wgPageName') === ' | if (mw.config.get('wgPageName') === '首页') { | ||
$(function() { | $(function() { | ||
$("#contentwrapper").html("1234") | $("#contentwrapper").html("1234") |
2025年4月27日 (日) 06:47的版本
/* 这里的任何JavaScript将为所有用户在每次页面载入时加载。 */ /* 重写首页代码 */ if (mw.config.get('wgPageName') === '首页') { $(function() { $("#contentwrapper").html("1234") }); } // 添加事件监听器 $('#video').prepend('<video style="width:100%;height:100%"controls src="/768DM.mp4">') $('#ca-edit').html("<span class='fa fa-pen'></span> 编辑本页") $("#mw-toc-heading a").text('返回顶部') $("#pt-userpage").text("用户页") $('#MSG600').click(function(){ localStorage.clear(); window.location.href = 'http://192.168.10.58:8080/index.php?title=%E5%B8%AE%E5%8A%A9'; }); $('#MSG500').click(function(){ localStorage.clear(); window.location.href = 'http://192.168.10.58:8080/index.php?title=%E5%BC%80%E5%B1%80%E6%8C%87%E5%AF%BC'; }); $('#FAQ').click(function(){ localStorage.clear(); window.location.href = 'http://192.168.10.58:8080/index.php?title=FAQ'; }); $('#Qlinkbailn').click(function(){ localStorage.clear(); window.location.href = 'http://192.168.10.58:8080/index.php?title=Qlinkbailn'; }); $('#SMARTCT-E600').click(function(){ localStorage.clear(); window.location.href = 'http://192.168.10.58:8080/index.php?title=SMARTCT-E600'; });