User talk:Writ Keeper

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Writ Keeper (talk | contribs) at 21:11, 23 April 2024 (→‎I need a script: how's this). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

I need a script

Can you provide some magical software thingy that, before saving my edit, checks for some combination of {[, [{, ]}, or }] and prevents the edit being saved? Preferably with a friendly message along the lines of "hey moron, you just did it again". If I felt like it was other people besides me, I'd suggest an edit filter (I don't think those characters in that order would ever make sense). But I think it's just me.

In other news: hey stranger, how are things? Floquenbeam (talk) 15:38, 23 April 2024 (UTC)[reply]

@Floq: Okay, that was harder than I was expecting, but here you go: User:Writ_Keeper/Scripts/syntaxChecker.js. As usual, install by inserting the line mw.loader.load("/w/index.php?title=User:Writ_Keeper/Scripts/syntaxChecker.js&action=raw&ctype=text/javascript"); into your common.js page. If you mismatch square and curly braces next to each other, it should give you a popup when you try to save the edit, alerting you and asking if you're sure you want to save the edit. If you hit cancel, it should then highlight the mismatched braces for you in the text field. It's designed to do its best to *not* ask you about any mismatched braces that are already in the page before you started editing, but the detection algorithm is fairly primitive, so false positives are likely in complex scenarios. Also, I have it disabled in article space, but let me know if you either want to enable it there too, or if there are any other namespaces you would like disabled.
In other news: things are going all right. Some positive IRL developments. Keeping half an eye on Wikipedia as time permits. Same ol', same ol', I suppose. Writ Keeper  21:11, 23 April 2024 (UTC)[reply]