User:Martin Urbanec/urlshortener.js
Appearance
From Meta, a Wikimedia project coordination wiki
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/** * URLShortener * Authored by ZI Jony, edited by Martin Urbanec */ // i18n for Gadget vari18n_lang=mw.config.get('wgUserLanguage'); vari18nFormoveAndreplace={ 'en':{ 'mainTitle':'URL Shortener' }, 'bn':{ 'mainTitle':'ইউআরএল সংক্ষেপক' } }; mw.loader.using(['mediawiki.util'],function(){ "use strict"; mw.util.addPortletLink( 'p-tb', '//meta.wikimedia.org/wiki/Special:UrlShortener?url='+mw.config.get('wgServer')+'/wiki/'+mw.config.get('wgPageName'), 'URL Shortener', 't-Special:UrlShortener', 'Launch URL Shortener', 'v', '#t-info' ); });