MediaWiki talk:Gadget-ShortLink.js

Latest comment: 9 months ago by Mdaniels5757 in topic +zh


Update edit

{{Editprotected}} Could someone change this script to use mw.config.get( 'wg*' ) when accessing wg* variables as explained on mw:RL/MGU#wg* Variables?

$(function(){
 //add a shortlink
   if( mw.config.get( 'wgServer' ) == 'https://secure.wikimedia.org' ) {
    mw.util.addPortletLink('p-tb', mw.config.get( 'wgScript' ) + '?curid=' + mw.config.get( 'wgArticleId' ), 'Short link', 't-shortlink', '', null, $("#t-specialpages").next().next().get() );
  } else {
    mw.util.addPortletLink('p-tb', mw.config.get( 'wgServer' ) + '/?curid=' + mw.config.get( 'wgArticleId' ), 'Short link', 't-shortlink', '', null, $("#t-specialpages").next().next().get() );
  }
});

Helder 22:55, 29 June 2011 (UTC)

  Done Thank you. – Kwj2772 (msg) 14:42, 1 July 2011 (UTC)Reply

Protocol-relative and i18n edit

Protocol-relative URLs should be implemented. i18n should be performed as well. Wizardist (talk) 12:41, 17 March 2012 (UTC)Reply

mw.util requirement edit

{{Editprotected}}

This script sometimes results in the error TypeError: mw.util is undefined. That’s because it requires the function mw.util, which is not guaranteed to be always immediatly available if it’s not requested. Admins usually dealing with gadgets propably know what I mean and how to solve it, so I’m not looking it up right now. --Nenntmichruhigip (talk) 17:06, 21 July 2017 (UTC)Reply

@Nenntmichruhigip: Thanks! Done, Special:Diff/252989567. --Krinkle 00:20, 25 July 2017 (UTC)Reply

+uk edit

{{Editprotected}} Please add a line:

uk: 'Коротке посилання',

Thanks! --Ата (talk) 15:25, 26 November 2019 (UTC)Reply

  Done Awesome! Thank you! ~riley (talk) 19:30, 6 December 2019 (UTC)Reply

+tr edit

{{Editprotected}} Please add the following translation for Turkish:

tr: 'Kısa bağlantı',

Thanks :)--Evrifaessa (talk) 10:10, 25 July 2020 (UTC)Reply

I made this gadget publicly available in trwiki, and it still shows English language strings as you didn't add translations. @4nn1l2: , @Lucas Werkmeister: - please add my translation to the global script. Thanks.--evrifaessa ❯❯❯ mesaj 12:33, 1 August 2020 (UTC)Reply
@Evrifaessa:   Done, but when creating an edit request, please use {{Editprotected}} and not {{tl|Editprotected}} so that the request shows up in the maintenance category – changing it to the “tl” version is the admin’s job, after fulfilling the request :) --Lucas Werkmeister (talk) 14:15, 1 August 2020 (UTC)Reply
Oh, thanks.--evrifaessa ❯❯❯ mesaj 14:16, 1 August 2020 (UTC)Reply

+zh edit

{{Editprotected}} Please add the Chinese translation:

zh: '短链接',

Thanks a lot! -- Vikarna 14:44, 20 August 2023 (UTC)Reply

Return to "Gadget-ShortLink.js" page.