User talk:Polygnotus/Scripts/WikiTextExpander

Latest comment: 26 days ago by Polygnotus in topic AutoKey

AutoKey

edit

Reminds me of AutoKey and AutoHotkey and variations. I use extensively for Wikipedia. What I like most is I can type a plain text keyword like "citeweb" then space bar, and it automatically replaces the keyword with a blank template (for this example). No need to highlight and press a hot key combo. Would that even be technically possible with a JavaScript user tool? — GreenC 21:13, 31 July 2025 (UTC)Reply

@GreenC Yes, that is possible. The reason I chose the current approach is that people might use very short strings to be replaced. For example I could set "ily" to expand to "I love you" but then "daily" would become "daI love you". So fully automatic replacing would require a bit more user education.   Polygnotus (talk) 00:17, 1 August 2025 (UTC)Reply
Oh cool. In AutoKey the replacement is done only after pressing space at the end of the keyword. Also up to the user to choose a reasonably unique keyword, to avoid unintended replacements. It's a major time saver to have this feature, makes adding things go much smoother. You could of course have multiple options in the cfg: replace on keyword terminated by space, replace on highlight and hotkey, etc.. -- GreenC 02:03, 1 August 2025 (UTC)Reply
@GreenC That is a good idea. Maybe we can post a request on WP:SCRIPTREQ? The userbox on my userpage about hating JavaScript is not a joke (although some people seem to interpret it as one). Polygnotus (talk) 02:11, 1 August 2025 (UTC)Reply
@GreenC I posted here, feel free to make any corrections/improvements/additions. Thanks! Polygnotus (talk) 02:16, 1 August 2025 (UTC)Reply