Remove MediaWiki links

I often edit on Wikipedia. The following snippet removes MediaWiki links.

# popclip
name: Remove MediaWiki links
icon: square filled monospaced [[
javascript: popclip.pasteText(popclip.input.text.replace(/\[\[(?:[^|\]]*\|)?([^\]]+)\]\]/g, '$1'))
description: Remove MediaWiki links

(How to install extension snippets)

Before:

‘’‘Steven Paul Jobs’’’ (February 24, 1955 – October 5, 2011) was an American [[Entrepreneurship|entrepreneur]], [[industrial design]]er, [[business magnate]], [[media proprietor]], and investor.

After:

‘’‘Steven Paul Jobs’’’ (February 24, 1955 – October 5, 2011) was an American entrepreneur, industrial designer, business magnate, media proprietor, and investor.

@nick A strikethrough look for the icons would be handy for all snippets related to removing stuff.

2 Likes

Nice idea!