Widget:MainPageChangelog
Ir para navegação
Ir para pesquisar
<style>
.widget-changelog {
max-height: 280px;
overflow-y: auto;
padding-right: 5px;
box-sizing: border-box;
}
.notice-item {
display: flex;
align-items: flex-start;
position: relative;
gap: 0;
background: #fff;
border: 1px solid #ddd;
border-left: 4px solid var(--notice-color, #999);
padding: 5px 10px;
border-radius: 6px;
margin: 0 0 8px 0;
}
.notice-content { flex: 1; min-width: 0; }
.notice-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
margin-bottom: 6px;
}
.notice-header-left {
display: inline-flex;
align-items: center;
gap: 1px;
min-width: 0;
}
.notice-title {
font-weight: 700;
font-size: 14px;
line-height: 1.2;
display: inline-flex;
align-items: center;
gap: 6px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
}
.notice-title a {
text-decoration: none;
}
.notice-date {
font-size: 12px;
color: #666;
white-space: nowrap;
}
.notice-desc {
margin: 0;
font-size: 13px;
color: #333;
}
/* Ícones — sem margin-right */
.notice-icon {
width: 32px;
height: 32px;
object-fit: contain;
flex-shrink: 0;
border-radius: 4px;
background: transparent;
margin-right: 0 !important; /* zera */
margin-top: 2px;
position: static;
opacity: 0.9;
}
.notice-icon--inline {
display: inline-block;
width: 32px;
height: 32px;
margin-right: 0 !important; /* zera */
position: static;
opacity: 0.9;
}
.notice-icon--overlay { display: none !important; }
</style>
<script> document.addEventListener('DOMContentLoaded', function () {
const root = document.querySelector('.widget-changelog');
if (!root) return;
root.querySelectorAll('.notice-item').forEach(function (item) {
const linkEl = item.querySelector('.notice-link');
const titleEl = item.querySelector('.notice-title');
if (!linkEl || !titleEl) return;
let url = (linkEl.getAttribute('data-url') || )
.replace(/[\r\n\t]/g, )
.trim();
if (!url) return;
if (!titleEl.querySelector('a')) {
const textSpan = titleEl.querySelector('.notice-title-text');
const text = (textSpan ? textSpan.textContent : titleEl.textContent).trim();
titleEl.innerHTML = ;
const a = document.createElement('a');
a.href = url;
a.target = '_blank';
a.rel = 'noopener noreferrer';
a.textContent = text || url;
titleEl.appendChild(a);
}
// remove o marcador para não sobrar lixo no DOM linkEl.remove(); });
// blindagem: qualquer link abre em nova aba
root.querySelectorAll('a').forEach(function (a) {
a.setAttribute('target', '_blank');
a.setAttribute('rel', 'noopener noreferrer');
});
}); </script>