MediaWiki:Gadget-SelectionCounter.js:修订间差异
MediaWiki界面页面
更多操作
删除的内容 添加的内容
Maintenance script(留言 | 贡献) 拖选时实时更新并增强触发 |
Maintenance script(留言 | 贡献) 为未加载 CSS 提供可见性兜底 |
||
| 第20行: | 第20行: | ||
.appendTo('body'); |
.appendTo('body'); |
||
} |
} |
||
function ensureVisibleStyles() { |
|||
var el = $counter[0]; |
|||
if (!el) { |
|||
return; |
|||
} |
|||
var computed = window.getComputedStyle(el); |
|||
if (computed.position !== 'static') { |
|||
return; |
|||
} |
|||
$counter.css({ |
|||
position: 'fixed', |
|||
bottom: '24px', |
|||
right: '24px', |
|||
padding: '6px 10px', |
|||
fontSize: '12px', |
|||
borderRadius: '4px', |
|||
background: 'var(--color-surface-0, rgba(255, 255, 255, 0.85))', |
|||
border: '1px solid var(--border-color-base, #aaa)', |
|||
color: 'var(--color-base, #333)', |
|||
boxShadow: '0 1px 3px rgba(0, 0, 0, 0.2)', |
|||
backdropFilter: 'blur(4px)', |
|||
zIndex: 2147483647, |
|||
pointerEvents: 'none' |
|||
}); |
|||
} |
|||
ensureVisibleStyles(); |
|||
var rafId = null; |
var rafId = null; |
||