更多操作
注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。
- 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。
/* 这里放置的CSS将应用于所有皮肤 */
body {
font-family: '等距更纱黑体 SC', 'Noto Sans Mono CJK SC', 'JetBrains Mono', 'Ubuntu Mono', monospace, sans-serif;
}
/* 检查当前页面是否是主页 */
if (mw.config.get('wgPageName') === '主页') {
/* 定义背景图片数组 */
var images = [
'https://imgse.com/i/pAZC7Kf',
'https://imgse.com/i/pAZCHr8',
'https://imgse.com/i/pAZCbqS',
/* 添加更多图片URL */
];
/* 随机选择一张图片 */
var randomImage = images[Math.floor(Math.random() * images.length)];
/* 应用随机选择的背景图片,并叠加渐变透明效果 */
document.body.style.backgroundImage =
'linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0)),' +
'url(' + randomImage + ')';
document.body.style.backgroundSize = 'cover';
document.body.style.backgroundPosition = 'center';
document.body.style.backgroundRepeat = 'no-repeat';
}