User:DreamRimmer/adminnewslettertools.js: Difference between revisions

Content deleted Content added
return deduplicated data
-
Line 849:
let pageName, anchor, displayTitle;
const link = match[1];
displayTitle = match[12] || linkpageName;
if (link.includes('#')) {
Line 947:
const topicDisplay = rfc.topics.length === 1
? rfc.topics[0]
: `${rfc.topics} <span class="topic-toggle" onclick="toggleTopics(${index})" style="cursor:pointer;color:#0645ad;text-decoration:underline;font-size:0.9em;">(see+${rfc.topics.length - 1} more)</span><div id="topics-${index}" style="display:none;margin-top:5px;font-size:0.9em;line-height:1.3;">${rfc.topics.slice(1).map(t => `• ${t}`).join('<br>')}</div>`;
table += `<tr><td>${topicDisplay}</td><td><a href="${rfc.url}" target="_blank">${rfc.title}</a></td><td>${rfc.daysOld}</td><td>${rfc.timestamp}</td></tr>`;
Line 969:
if (topicsDiv.style.display === 'none') {
topicsDiv.style.display = 'block';
toggleSpan.textContentinnerHTML = '(see less)';
} else {
topicsDiv.style.display = 'none';
var rfc = window._rfcs.filter(function(r) { return !isNaN(r.daysOld) && r.daysOld <= parseInt(document.getElementById('rfc-age-filter').value, 10); }).sort(function(a, b) { return a.daysOld - b.daysOld; })[index];
toggleSpan.textContentinnerHTML = '(see+' + (rfc.topics.length - 1) + ' more)';
}
}