User:Sohom Datta/PageTriageUserspaceLogger

Source: Wikipedia, the free encyclopedia.
PROD nominations made using the PageTriage curation toolbar
Author(s)Sohom Datta
StatusBeta
UpdatedNovember 18, 2023
    (19 months ago)
Skinsall
SourcePageTriageUserspaceLogger.js

PageTriageUserspaceLogger or PTUL (

PROD nominations made using the PageTriage
curation toolbar.

Installation

This script can be imported to skin.js or common.js by adding:
importScript( 'User:Sohom Datta/PageTriageUserspaceLogger.js' );// [[User:Sohom Datta/PageTriageUserspaceLogger.js]]
or
{{subst:Iusc|User:Sohom Datta/PageTriageUserspaceLogger.js}}

Configuration

This script respects the Twinkle perferences as set in twinkleoptions.js. No additional configuration is required or provided.

Technical

The userscript is effectively a shim layer that hooks into the PageTriage actionQueue API, parses the tags being applied and then uses the lower level Morebits.userspaceLogger() to mimic the way Twinkle logs entries. This is done since the respective addToLog() functionality for each twinkle module is highly coupled within the context of the specific module and is incompatible with the actionQueue API unless it rewritten to ingest saner input data and return $.Deferred() promise objects.