Content deleted Content added
DreamRimmer (talk | contribs) - |
DreamRimmer (talk | contribs) add convenient-discussions tag (DR) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 614:
format: 'json'
}).then(revisions => {
const filtered = revisions.filter(rev => rev.tags && (rev.tags.includes('discussiontools-newtopic') || rev.tags.includes('convenient-discussions')));
return createEditTable('ArbCom topics', filtered, true);
});
Line 849:
let pageName, anchor, displayTitle;
const link = match[1];
displayTitle = match[2] ||
if (link.includes('#')) {
[pageName, anchor] = link.split('#');
Line 915 ⟶ 914:
const ageOptions = [3, 7, 10, 15, 20, 25, 30];
▲ const rfcsGrouped = {};
rfcs.forEach(rfc => {
if (
if
} else
rfcMap.set(uniqueKey,
});
}
▲ rfcsGrouped[key].topics.push(rfc.topic);
});
const deduplicatedRfcs =
let html = `<p><small>Current date: ${currentDate}</small></p>`;
Line 943:
function renderRfCTable(filteredRfcs) {
if (filteredRfcs.length > 0) {
let table = '<h4>Current RfCs</h4><table class="wikitable sortable"><thead><tr><th>Topic
filteredRfcs.sort((a, b) => a.daysOld - b.daysOld).forEach((rfc, index) => {
} else {
const additionalTopics = rfc.topics.slice(1).join(', ');
topicDisplay = `
<span class="main-topic">${mainTopic}</span>
<span class="additional-topics" style="color: #0645ad; cursor: pointer; text-decoration: underline;"
onclick="toggleTopics('topics-${index}')"
title="${additionalTopics}">
(+${additionalCount} more)
<div id="topics-${index}" style="display: none; margin-top: 5px; font-size: 0.9em; color: #666;">
${rfc.topics.slice(1).map(topic => `<div>• ${topic}</div>`).join('')}
</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 964 ⟶ 981:
window._ageOptions = ${JSON.stringify(ageOptions)};
function toggleTopics(
var
▲ topicsDiv.style.display = 'block';
▲ toggleSpan.innerHTML = '(see less)';
} else {
▲ toggleSpan.innerHTML = '(+' + (rfc.topics.length - 1) + ' more)';
}
}
Line 985 ⟶ 998:
document.getElementById('rfc-list-table').innerHTML = (${renderRfCTable.toString()})(filteredRfcs);
}
document.getElementById('rfc-age-filter').addEventListener('change', updateRfCTable);
updateRfCTable();
</script>`;
return html;
}
|