Jump to content

User:Nardog/InsertAnyChar

From Wikipedia, the free encyclopedia
InsertAnyChar
DescriptionInsert any character by searching in the entire Unicode chart
UpdatedSeptember 30, 2024
    (44 days ago)
BrowsersChrome, Firefox, etc. (ES2020+ needed)
SourceUser:Nardog/InsertAnyChar.js

This script allows you to quickly look up a Unicode name and insert any character while editing. It adds a button to the WikiEditor toolbar, which opens a search box where you can search by character name.

Installation

[edit]

Add the following to your common.js or global.js:

mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Nardog/InsertAnyChar.js&action=raw&ctype=text/javascript');

Or you may enable the script installer in Preferences → Gadgets and click "Install" in the infobox on this page.

Notes

[edit]

A character is a match if every search term matches the beginning of a word in the Unicode name. For the CJK Ideograph, Tangut Ideograph, and Private Use blocks, a term may also match hexadecimal code points. Surrogates are excluded.

The names, originally in all caps, are put in title case for legibility. This is algorithmically done so some names may have inappropriate capitalization.

Up to 100 matches are returned at once, with infinite scrolling.

The script fetches the entire Unicode data from Wiktionary when the button is clicked and stores it, so it may be memory-intensive.

You can customize the font stack for the characters in the list by specifying font-family for .insertanychar-char in your CSS.