MediaWiki:Common.js:修订间差异

来自赛尔号精灵图鉴
跳转到导航 跳转到搜索
无编辑摘要
标签已被回退
无编辑摘要
 
(未显示同一用户的13个中间版本)
第1行: 第1行:
/* 这里的任何JavaScript将为所有用户在每次页面加载时加载。 */
$(function () {
$(function () {
   // 只在条目页面生效,不影响首页/编辑页等
   const btn = $('<a href="/index.php/首页" id="return-home-button">🏠 返回首页</a>').css({
  if (mw.config.get("wgNamespaceNumber") === 0) {
    position: 'fixed',
    $('<a href="/index.php/首页" id="return-home-button">返回首页</a>')
    bottom: '20px',
      .appendTo('body');
    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);
});
});
<style>
.stat-calc {
  background: rgba(255,255,255,0.8);
  padding: 15px;
  border-radius: 10px;
  max-width: 600px;
  margin: 0 auto;
  font-family: sans-serif;
}
.config-block {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.config-block label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
}
.stat-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}
.stat-table th, .stat-table td {
  border: 1px solid #ccc;
  padding: 5px;
  text-align: center;
}
.stat-table input {
  width: 60px;
}
.result {
  font-weight: bold;
  color: #FF6600;
}
#calc-btn {
  background: #4CAF50;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}
#calc-btn:hover {
  background: #45a049;
}
</style>

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);
});
👥 当前在线人数:68