MediaWiki talk:Gadget-mySandbox.js

misdirected when accessing via https
When I'm accessing via https (secure.wikimedia.org) and click on the "My sandbox" link - it takes me to https://secure.wikimedia.org/wikipedia/incubator/wiki/W/index.php/Special:MyPage/sandbox - not quite sure how that can be fixed, but it probably should be. -- Versa geek  21:28, 19 March 2012 (UTC)
 * The best solution would be to use https://en.wikipedia.org rather than the deprecated secure.wikimedia.org server. Anomie⚔ 22:57, 19 March 2012 (UTC)
 * Thanks, I'll update my bookmarks. :) -- Versa geek  23:20, 19 March 2012 (UTC)


 * I think I have a fix but I'm not comfortable editing gadgets. Replace
 * by
 * PrimeHunter (talk) 04:13, 20 March 2012 (UTC)
 * You could probably leave out the, just   (or  ) should do it. Anomie⚔ 11:35, 20 March 2012 (UTC)
 * I made the fix before seeing your post. It works for me at both unsecure, old secure and new secure but I don't know much about this. Just change it if you think something else is better. PrimeHunter (talk) 11:41, 20 March 2012 (UTC)
 * Not really worth worrying about, IMO, at least until they start to plan on removing those globals in favor of mw.config. Anomie⚔ 15:31, 20 March 2012 (UTC)
 * The global wg variables have already been deprecated, and they should not be used. Same goes for secure.wikimedia.org, which should soon be redirected to the appropriate wikipedia.org domain. We just finished clearing up all that deprecated stuff, so it's not a good idea to reintroduce them. — Edokter  ( talk ) — 18:59, 20 March 2012 (UTC)
 * Not really worth worrying about, IMO, at least until they start to plan on removing those globals in favor of mw.config. Anomie⚔ 15:31, 20 March 2012 (UTC)
 * The global wg variables have already been deprecated, and they should not be used. Same goes for secure.wikimedia.org, which should soon be redirected to the appropriate wikipedia.org domain. We just finished clearing up all that deprecated stuff, so it's not a good idea to reintroduce them. — Edokter  ( talk ) — 18:59, 20 March 2012 (UTC)


 * Another fix has been posted to Village pump (technical):


 * I have tested it works in my own vector.js at all of http://en.wikipedia.org, https://en.wikipedia.org, https://secure.wikimedia.org/wikipedia/en/wiki/. Are there any objections to this fix? PrimeHunter (talk) 18:39, 25 March 2012 (UTC)
 * ✅. — Edokter  ( talk ) — 18:04, 26 March 2012 (UTC)
 * Thanks. PrimeHunter (talk) 21:47, 26 March 2012 (UTC)

Snippet
There is now a snippet for this used by lots of wikis: Snippet "MySandbox" on mediawiki.org. It was based on this one but has since gotten: Krinkle (talk) 13:57, 24 August 2012 (UTC)
 * Easier configuration (without worrying about html escaping or url encoding)
 * Closure to protect against jQuery overload
 * Using mw.Title to automatically convert titles to canonical (localized) versions
 * Link to edit page if new, link to view page if existing (with magic "redlink=1" redirect).

Bug in link colour
Please see Village_pump_(technical) (permanent link). Thanks. Mike Peel (talk) 09:49, 17 August 2014 (UTC)