Page MenuHomePhabricator

Add new "button" for Wiki URL shortener in the menu in Wikipedia
Closed, DuplicatePublic

Description

Hi, There is request - Task Maniphest T222146, to include the https:// when shortened URLs are generated at https://meta.wikimedia.org/wiki/Special:UrlShortener. I would like to request a add a "button ( Wiki URL)" " (like "Cite" / "Link") on the menu bar on top or as one of drop down list on the "More" section of the Wikipedia page so editors dont need to go to WikiMedia page to get the URL shorten. Kindly advise if this a workable request.

Event Timeline

Adding project tag, so someone could find this task.

The sidebar feature already exists, just needs to be rolled out by CPT. cc @Legoktm, @Fjalapeno and @CCicalese_WMF

Here's a bookmarklet that uses the API if it has access to credentials, or will redirect to the special page for other domains (e.g. on phabricator):

https://github.com/edg2s/w.wiki-bookmarklet

Here's how this looks on-wiki:

image.png (532×892 px, 133 KB)

image.png (534×915 px, 130 KB)

If you are off-wiki (e.g. on Phab) you get redirect to the special page:

image.png (264×736 px, 36 KB)

This could also be easily converted into a browser extension...

There's also a gadget at Frwiki: https://fr.wikipedia.org/wiki/MediaWiki:Gadget-ShortenUrl.js
Which can be added to your global.js with

// ShortURL in the 'Tools' sections of sidebar
mw.loader.load('https://fr.wikipedia.org/w/index.php?title=MediaWiki:Gadget-ShortenUrl.js&action=raw&ctype=text/javascript');