Misplaced Pages

User:Andrybak/Scripts/Unsigned helper: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
< User:Andrybak | Scripts Browse history interactively← Previous editContent deleted Content addedVisualWikitext
Revision as of 21:02, 20 July 2024 editAndrybak (talk | contribs)Extended confirmed users, Template editors81,054 edits See also: add User:Andrybak/Scripts/Unsigned generator← Previous edit Latest revision as of 21:15, 5 August 2024 edit undoAndrybak (talk | contribs)Extended confirmed users, Template editors81,054 edits Changelog: "released" → "published" 
(9 intermediate revisions by the same user not shown)
Line 2: Line 2:
|author=], ] |author=], ]
|released=2024-07-20 |released=2024-07-20
|desc = Simplifies adding {{tl|Unsigned}} and {{tl|Unsigned IP}} |desc = Simplifies adding {{tl|Unsigned}}, {{tl|Unsigned IP}}, and {{tl|Undated}}
}} }}
'''Unsigned helper''' is a ] for semi-automatically adding templates {{tl|Unsigned}} and {{tl|Unsigned IP}}. '''Unsigned helper''' is a ] for semi-automatically adding templates {{tl|Unsigned}}, {{tl|Unsigned IP}}, and {{tl|Undated}}. This script is a fork of ] with faster search, an automatic edit summary, and added support for the ] editor (]).

This script is a fork of ]. Differences: faster search, automatic edit summary.


==How to install== ==How to install==
{{User:Andrybak/Templates/How to install}}
It's recommend to install this script using the script-installer gadget, which can be turned on at

: {{myprefs|Gadgets|]|check={{int:Gadget-script-installer}}}}

Then you can go back to this page and click the big blue "Install" button in the infobox.


==How to use== ==How to use==
# Open the wikitext editor for the discussion, where you want to mark an unsigned message. # 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 ] for details). # In the dropdown below the editor, select button set "Insert" or "Wiki markup" (see ] for details).
# At the end of the button set, click on <span style="background-color: var(--background-color-interactive-subtle,#f8f9fa); color: var(--color-progressive,#36c); border: 1px solid var(--border-color-interactive,#72777d); padding: 1px 4px;">{{fake link|1={{tlf|unsigned}}|2=}}</span> # At the end of the button set, click on <span style="background-color: var(--background-color-interactive-subtle,#f8f9fa); color: var(--color-progressive,#36c); border: 1px solid var(--border-color-interactive,#72777d); padding: 1px 4px;">{{fake link|1={{tlf|unsigned}}|2=}}</span><!-- styling, which was implemented at ] -->
# Wait for the script to find the revision, which introduced this change. # Wait for the script to find the revision, which introduced this change.
# Check that the diff found by script corresponds to the unsigned message.
# Click button {{mw button|{{int:showdiff}}|normal}} at the bottom.
# If the found diff is wrong, click button "Keep looking".
# Check that the generated signature corresponds to the ] in the edit summary.
# If the found diff is correct, click button "Use that revision".
# Click button {{mw button|{{int:publishchanges}}|progressive}} at the bottom.
# Once ready, click button {{mw button|{{int:publishchanges}}|progressive}} at the bottom.


===Known issues=== ===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. * 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 ], ], ], or when ] is enabled. * Doesn't work in ], ], ].
* 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 ] ] on 2011-12-11. The forked script was developed as follows:

* ] – the fork is published and automatic edit summaries is immediately added. This was inspired by automatic edit summary support in ].
* ] – the script is heavily refactored. The search is upgraded to use ] instead of ], greatly increasing the speed of finding the correct revision.
* ] – support for ] is added. UI now shows the user a link to the found diff to allow manual inspection
* ] – support for ] is added. The code for inserting the template now uses , similarly to how enwiki's version of ] ]. See also ], ], and ].


==See also== ==See also==

Latest revision as of 21:15, 5 August 2024

Unsigned helper
DescriptionSimplifies adding {{Unsigned}}, {{Unsigned IP}}, and {{Undated}}
Author(s)Anomie, andrybak
First released2024-07-20
UpdatedAugust 5, 2024
    (4 months ago)
SourceUser:Andrybak/Scripts/Unsigned helper.js

Unsigned helper is a user script for semi-automatically adding templates {{Unsigned}}, {{Unsigned IP}}, and {{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

On English Misplaced Pages it is recommended to install this script using the script-installer gadget, which can be turned on at:

Preferences → Gadgets → Advanced → Tick Install scripts without having to manually edit JavaScript files (documentation) (direct link)

Then you can go back to this page and click the big blue "Install" button in the infobox.

To install the script on another wiki (including your global.js), use the following snippet:

mw.loader.load('https://en.wikipedia.org/search/?title=User:Andrybak/Scripts/Unsigned_helper.js&action=raw&ctype=text/javascript');

How to use

  1. Open the wikitext editor for the discussion, where you want to mark an unsigned message.
  2. In the dropdown below the editor, select button set "Insert" or "Wiki markup" (see MediaWiki talk:Edittools for details).
  3. At the end of the button set, click on {{unsigned}}
  4. Wait for the script to find the revision, which introduced this change.
  5. Check that the diff found by script corresponds to the unsigned message.
  6. If the found diff is wrong, click button "Keep looking".
  7. If the found diff is correct, click button "Use that revision".
  8. Once ready, click button Publish changes 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 {{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 {{unsigned}} instead of {{undated}}.

Changelog

The original script User:Anomie/unsignedhelper was published on 2011-12-11. The forked script was developed as follows:

See also

Category: