From 3af18ffe2564bac47892723f8bcf889184110876 Mon Sep 17 00:00:00 2001 From: DatGuy1 Date: Mon, 25 Aug 2025 15:07:34 +0300 Subject: [PATCH] automatically find users if using 2017 wikitext editor enabling the 2017 wikitext editor adds &veaction=editsource to the 'edit source' button, which causes the $= selector to fail --- spihelper.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spihelper.js b/spihelper.js index b7ed7a3..33ac096 100644 --- a/spihelper.js +++ b/spihelper.js @@ -766,8 +766,8 @@ async function spiHelperGenerateForm () { likelyusers.push(spiHelperCaseName) - let socklist = $(`a[href$="section=${spiHelperSectionId}"]`).parents().not(':has(hr)').nextUntil('hr').find('.cuEntry').find('a:first') - for(let element of socklist) { + let socklist = $(`a[href*="section=${spiHelperSectionId}"]`).parents().not(':has(hr)').nextUntil('hr').find('.cuEntry').find('a:first') + for (let element of socklist) { let username = spiHelperNormalizeUsername($(element).text()) const isIP = mw.util.isIPAddress(username, true) if (!isIP && !likelyusers.includes(username)) {