Add double square brackets to selection (Wikilinks)

I often edit on Wikipedia. This extension snippets adds double square brackets to the selection (MediaWiki internal links).

#popclip
name: Wikilink
icon: DSB
javascript: popclip.pasteText("[[" + popclip.input.text + “]]”)
description: Adds double square brackets to selection

As icon I’d have loved [[]], but this does not seem possible.

Regards!

Double square brackets have a special meaning, and you can’t have 4 characters in an icon.
But you can prefix with text to allow any characters. Maybe this is a compromise:

#popclip
name: Wikilink
icon: monospaced [[
javascript: popclip.pasteText('[[' + popclip.input.text + ']]')
description: Adds double square brackets to selection

Edit: changed text to monospaced because it looks better in monospaced font IMO

1 Like

Thanks, I like your proposal.

1 Like