User:Euphoria/common.js: Difference between revisions
From Test Wiki
Content deleted Content added
No edit summary Tag: Reverted |
Tag: Undo |
||
Line 33:
// Handle VfD action for a target page
function handleAction(targetPage, actionName) {
// If on main page, close the subpage instead
const pageToEdit = (currentPage === pagePrefix) ? pagePrefix + '/' + targetPage : currentPage;
Line 142 ⟶ 143:
if (!confirm(`Are you sure you want to close as ${actionObj.name}?`)) return;
// Disable all buttons under this heading
$(heading).find('.vfd-action-link').each((i, b) => {
b.style.opacity = '0.5';
Line 164 ⟶ 166:
if (categories.includes('VfD archive entries')) return;
// ✅ Look
$('#mw-content-text').find('h2').each(function () {
const
let targetPage = headingText;
const firstLink = heading.find('a').first();▼
// On main page,
▲ } else {
▲ if (!headingText) return;
createButtonsForHeading(this, headingText);▼
}
});
});
| |||