MediaWiki:Common.js:修订间差异
跳转到导航
跳转到搜索
(创建页面,内容为“→这里的任何JavaScript将为所有用户在每次页面加载时加载。: $(function () { // 只在条目页面生效,不影响编辑页等 if (mw.config.get("wgNamespaceNumber") === 0) { $('<div>') .css({ margin: '10px 0', 'text-align': 'left' }) .html('<a href="/index.php/首页" style="padding:6px 12px; background-color:#007BFF; color:white; border-radius:4px; text-decoration:none;">← 返回首页</a>')…”) |
无编辑摘要 |
||
(未显示同一用户的16个中间版本) | |||
第1行: | 第1行: | ||
$(function () { | $(function () { | ||
// | const btn = $('<a href="/index.php/首页" id="return-home-button">🏠 返回首页</a>').css({ | ||
position: 'fixed', | |||
bottom: '20px', | |||
right: '20px', | |||
padding: '10px 14px', | |||
background: '#ffffffdd', | |||
color: '#333', | |||
fontSize: '14px', | |||
fontWeight: 'bold', | |||
border: '1px solid #ccc', | |||
borderRadius: '8px', | |||
textDecoration: 'none', | |||
boxShadow: '0 2px 6px rgba(0,0,0,0.2)', | |||
zIndex: 9999 | |||
}); | |||
$('body').append(btn); | |||
}); | }); |
2025年5月11日 (日) 13:14的最新版本
$(function () {
const btn = $('<a href="/index.php/首页" id="return-home-button">🏠 返回首页</a>').css({
position: 'fixed',
bottom: '20px',
right: '20px',
padding: '10px 14px',
background: '#ffffffdd',
color: '#333',
fontSize: '14px',
fontWeight: 'bold',
border: '1px solid #ccc',
borderRadius: '8px',
textDecoration: 'none',
boxShadow: '0 2px 6px rgba(0,0,0,0.2)',
zIndex: 9999
});
$('body').append(btn);
});
👥 当前在线人数:65