From 001f236c1c92ed2ea7954dcdd06388c2ddfbd811 Mon Sep 17 00:00:00 2001 From: NovemLinguae <79697282+NovemLinguae@users.noreply.github.com> Date: Tue, 26 Nov 2024 14:20:01 -0800 Subject: [PATCH] twinkle.js: comments to docblocks (#2076) --- twinkle.js | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/twinkle.js b/twinkle.js index e85fe962f..b301d67a8 100644 --- a/twinkle.js +++ b/twinkle.js @@ -423,6 +423,8 @@ Twinkle.summaryAd = ' ([[WP:TW|TW]])'; // ensure MOS:ORDER Twinkle.hatnoteRegex = 'short description|hatnote|main|correct title|dablink|distinguish|for|further|selfref|year dab|similar names|highway detail hatnote|broader|about(?:-distinguish| other people)?|other\\s?(?:hurricane(?: use)?s|people|persons|places|ships|uses(?: of)?)|redirect(?:-(?:distinguish|synonym|multi))?|see\\s?(?:wiktionary|also(?: if exists)?)'; +/* Twinkle-specific utility functions shared by multiple modules */ + /** * When performing rollbacks with [rollback] links, then visiting a user talk page, some data such as page name can be prefilled into Wel/AIV/Warn. Twinkle calls this a "prefill". This method gets a prefill, either from URL parameters (e.g. &vanarticle=Test) or from data previously stored using Twinkle.setPrefill() */ @@ -442,7 +444,9 @@ Twinkle.setPrefill = function (key, value) { Twinkle.prefill[key] = value; }; -// Used in XFD and PROD +/* + * Used in XFD and PROD + */ Twinkle.makeFindSourcesDiv = function makeSourcesDiv(divID) { if (!$(divID).length) { return; @@ -459,14 +463,17 @@ Twinkle.makeFindSourcesDiv = function makeSourcesDiv(divID) { } }; -/** Twinkle-specific utility functions shared by multiple modules */ -// Used in batch, unlink, and deprod to sort pages by namespace, as -// json formatversion=2 sorts by pageid instead (#1251) +/** + * Used in batch, unlink, and deprod to sort pages by namespace, as + * json formatversion=2 sorts by pageid instead (#1251) + */ Twinkle.sortByNamespace = function(first, second) { return first.ns - second.ns || (first.title > second.title ? 1 : -1); }; -// Used in batch listings to link to the page in question with > +/** + * Used in batch listings to link to the page in question with > + */ Twinkle.generateArrowLinks = function (checkbox) { const link = Morebits.htmlNode('a', ' >'); link.setAttribute('class', 'tw-arrowpage-link'); @@ -475,7 +482,9 @@ Twinkle.generateArrowLinks = function (checkbox) { checkbox.nextElementSibling.append(link); }; -// Used in deprod and unlink listings to link the page title +/** + * Used in deprod and unlink listings to link the page title + */ Twinkle.generateBatchPageLinks = function (checkbox) { const $checkbox = $(checkbox); const link = Morebits.htmlNode('a', $checkbox.val());