微件:自动更新文章列表
来自卡厄思梦境WIKI
<style> .auto-ann-item {
position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px; margin: 10px 0; color: #3a3a3a; background: linear-gradient(180deg, rgba(230,230,235,0.95), rgba(215,215,222,0.95)); border: 1px solid rgba(0,0,0,0.06); border-radius: 4px; box-shadow: 0 0 0 1px rgba(255,255,255,0.35) inset; cursor: pointer;
}
.auto-ann-left {
display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0;
}
.auto-ann-badge {
background: #000; color: #fff; padding: 2px 8px; border-radius: 3px; font-size: 12px; font-weight: 700; letter-spacing: 0.5px; line-height: 1.6; white-space: nowrap;
}
.auto-ann-title {
font-size: 14px; color: #333; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.auto-ann-date {
color: #6b6b6b; font-size: 12px; white-space: nowrap; flex: 0 0 auto;
}
.auto-ann-item:hover {
background: linear-gradient(180deg, rgba(236,236,241,0.96), rgba(222,222,230,0.96)); border-color: rgba(0,0,0,0.08);
} </style>
<script> document.addEventListener('DOMContentLoaded', function() {
document.querySelectorAll('.auto-ann-item').forEach(function(item) {
item.addEventListener('click', function() {
var pageTitle = this.getAttribute('data-page-title');
if (pageTitle) {
window.location.href = mw.util.getUrl(pageTitle);
}
});
});
}); </script>