Jump to content

Wikipedia talk:WikiProject User scripts/Scripts/Add toolbox link

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Update this script

[edit]

Please update the script, as so:

// <source lang="javascript">
// '''Note''': This is now just a thin wrapper around <code>mw.util.addPortletLink()</code> from
// [//www.mediawiki.org/wiki/ResourceLoader/Default_modules#mediaWiki.util mw.util]. 
// Please consider using <code>mw.util.addPortletLink()</code> directly instead.

function addToolboxLink(url, name, id) {
    return mw.util.addPortletLink('p-tb', url, name, id);
}

// [[Category:Wikipedia scripts]]
// </source>

I've switched to using the recommended mw.util, as well as changed the comments. Cheers, mc10 (t/c) 03:26, 20 October 2011 (UTC)[reply]

 Done — Martin (MSGJ · talk) 15:58, 20 October 2011 (UTC)[reply]

Protected edit request on 24 February 2019

[edit]

Change content model to JavaScript and remove source (or pre/nowiki) tags at top to remove the extraneous // when viewing the page. {{3x|p}}ery (talk) 02:01, 24 February 2019 (UTC)[reply]

Also applies to Wikipedia:WikiProject User scripts/Scripts/Add edit section 0, Wikipedia:WikiProject User scripts/Scripts/test-enhanced, Wikipedia:WikiProject User scripts/Scripts/Add LI link, Wikipedia:WikiProject User scripts/Scripts/Six tabs, Wikipedia:WikiProject User scripts/Scripts/Add purge to tabs, Wikipedia:WikiProject User scripts/Scripts/Logs link,Wikipedia:WikiProject User scripts/Scripts/Unwatch and Wikipedia:WikiProject User scripts/Scripts/External editor. {{3x|p}}ery (talk) 02:03, 24 February 2019 (UTC)[reply]
@Pppery: I've been kind-of in the process of making a guide for making scripts, that would (ideally) supercede the snippets you linked to - also, you may be interested in looking at Evad37's script module proposal, which would likewise may this kind of redundant. just a thought --DannyS712 (talk) 23:13, 25 February 2019 (UTC)[reply]
I've been thinking about what to do with all these pages a lot lately. I think I'd like to have a discussion to just toss 'em — loading scripts from projectspace will (eventually) be removed, and they're currently not handled appropriately like js in user- or mediawiki- space — i.e., changing the content model won't make these any more secure — so AFAICT this request is basically just a cosmetic request. ~ Amory (utc) 00:37, 27 February 2019 (UTC)[reply]
 Done @Amorymeltzer: agree we probably should start a migration of these. I did update the content model on this, as it is practically only a cosmetic item as you mentioned, but not hurting anything. — xaosflux Talk 14:49, 5 March 2019 (UTC)[reply]

@Xaosflux: This was a request that applied to more than one page. You only changed the content model of one of them. {{3x|p}}ery (talk) 20:01, 5 March 2019 (UTC)[reply]

 Done OK think I got them all @Pppery:. — xaosflux Talk 20:45, 5 March 2019 (UTC)[reply]