创建页面,内容为“→这里的任何JavaScript将为所有用户在每次页面加载时加载。: // 用 JS 强制向页面注入 CSS 样式 mw.loader.addStyleTag( ` #mq-global-header { margin-top: -15px !important; margin-bottom: 10px !important; } .page-首页 #firstHeading { display: none !important; } .page-首页 #siteSub, .page-首页 #contentSub { display: none !important; } ` ); // 强制将导航栏挪到标题上方第一行 $(document).ready(function()…” |
无编辑摘要 |
||
| 第11行: | 第11行: | ||
$('#mq-global-header').insertBefore('#firstHeading'); | $('#mq-global-header').insertBefore('#firstHeading'); | ||
}); | }); | ||
if (mw.config.get('wgAction') === 'view' && | |||
mw.config.get('wgCurRevisionId') !== mw.config.get('wgRevisionId') | |||
) { | |||
location.href = location.href + '?action=purge'; | |||
} | |||
2026年2月20日 (五) 23:33的版本
/* 这里的任何JavaScript将为所有用户在每次页面加载时加载。 */
// 用 JS 强制向页面注入 CSS 样式
mw.loader.addStyleTag( `
#mq-global-header { margin-top: -15px !important; margin-bottom: 10px !important; }
.page-首页 #firstHeading { display: none !important; }
.page-首页 #siteSub, .page-首页 #contentSub { display: none !important; }
` );
// 强制将导航栏挪到标题上方第一行
$(document).ready(function() {
$('#mq-global-header').insertBefore('#firstHeading');
});
if (mw.config.get('wgAction') === 'view' &&
mw.config.get('wgCurRevisionId') !== mw.config.get('wgRevisionId')
) {
location.href = location.href + '?action=purge';
}