w:User:Andrybak/Scripts/Unsigned helper
|released=2024-07-20
|desc = Simplifies adding {{tl|Unsigned}}, {{tl|Unsigned IP}}, and {{tl|Undated}}
}}
Unsigned helper is a user script for semi-automatically adding templates {{tl|Unsigned}}, {{tl|Unsigned IP}}, and {{tl|Undated}}. This script is a fork of User:Anomie/unsignedhelper with faster search, an automatic edit summary, and added support for the CodeMirror editor (syntax highlighting).
How to install
{{User:Andrybak/Templates/How to install}}
How to use
- Open the wikitext editor for the discussion, where you want to mark an unsigned message.
- In the dropdown below the editor, select button set "Insert" or "Wiki markup" (see MediaWiki talk:Edittools for details).
- At the end of the button set, click on {{fake link|1={{tlf|unsigned}}|2=}}
- Wait for the script to find the revision, which introduced this change.
- Check that the diff found by script corresponds to the unsigned message.
- If the found diff is wrong, click button "Keep looking".
- If the found diff is correct, click button "Use that revision".
- Once ready, click button {{mw button|{{int:publishchanges}}|progressive}} at the bottom.
=Known issues=
- If someone other than the original author has edited the unsigned comment, that someone will be (incorrectly) used in the {{tl|unsigned}} template.
- Doesn't work in VisualEditor, 2017 wikitext editor, wikEd.
- If an author of an undated comment changed their username since leaving the comment, it will be automatically marked with {{tl|unsigned}} instead of {{tl|undated}}.
Changelog<span class="anchor" id="History"></span>
The original script User:Anomie/unsignedhelper was published on 2011-12-11. The forked script was developed as follows:
- 2024-06-14 – the fork is published and automatic edit summaries is immediately added. This was inspired by automatic edit summary support in TemplateScript.
- 2024-07-20 – the script is heavily refactored. The search is upgraded to use binary search instead of linear search, greatly increasing the speed of finding the correct revision.
- 2024-07-22 – support for Template:Undated is added. UI now shows the user a link to the found diff to allow manual inspection
- 2024-08-05 – support for mw:Extension:CodeMirror is added. The code for inserting the template now uses [https://doc.wikimedia.org/mediawiki-core/master/js/module-jquery.textSelection.html#.encapsulateSelection the function
encapsulateSelection
], similarly to how enwiki's version of CharInsert does it. See also phab:T185917, phab:T211205, and gerrit:1003927.
See also
- User:Andrybak/Scripts/Unsigned generator – a more manual script, useful when this script cannot find the correct diff.