MediaWiki:Common.js
来自帮助文档
注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。
- Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5或Ctrl-R(Mac为⌘-R)
- Google Chrome:按Ctrl-Shift-R(Mac为⌘-Shift-R)
- Internet Explorer或Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5
- Opera:按 Ctrl-F5。
/* 这里的任何JavaScript将为所有用户在每次页面载入时加载。 */ /* 重写首页代码 */ if (mw.config.get('wgPageName') === '首页') { $(function() { $("#contentwrapper").html('<div class="documentimg" style=""></div>') $(".documentimg").css('margin-top: 70px;width: 100%;height: 366px;background-image: url(/images/5/5e/Document.png);') }); } // 添加事件监听器 $('#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'; });