MediaWiki talk:Common.js/Archive 21: Difference between revisions

Content deleted Content added
AnomieBOT (talk | contribs)
m Obsolete HTML tags "tt" swapped out for "code". Project Lint
 
(2 intermediate revisions by 2 users not shown)
Line 107:
::Yep! They are loading those URLs just because the English version is not (yet) made up of small RL modules. I could update them to use English Wikipedia's [//en.wikipedia.org/w/load.php load.php] to get the minified version once the code is migrated to gadgets. [[User:Helder.wiki|Helder.wiki]] 20:25, 7 April 2014 (UTC)
:::I don't think that's proper use of load.php. JS modules are loaded by way of a call to mw.loader.load(). <span style="font-family:'Trebuchet MS'"> — [[User:Edokter|<span style="color:#008"><i>E</i>dokter</span>]] ([[User talk:Edokter|<span style="color:#080">talk</span>]]) — </span> 20:51, 7 April 2014 (UTC)
::::What I meant was that other wikis could use something like<br /><syntaxhighlight lang="javascript" enclose="none"inline>mw.loader.load( '//bits.wikimedia.org/en.wikipedia.org/load.php?modules=ext.gadget.EXAMPLE&only=scripts' )</syntaxhighlight><br />instead of<br /><syntaxhighlight lang="javascript" enclose="none"inline>mw.loader.load( '//en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-EXAMPLE.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400' )</syntaxhighlight><br />to get the minified version of the module <code>ext.gadget.EXAMPLE</code>.
::::Anyway, that is only for other wikis. The loader on English Wikipedia will use just <syntaxhighlight lang="javascript" enclose="none"inline>mw.loader.load( 'ext.gadget.EXAMPLE' )</syntaxhighlight> to load the modules by their names (since they are local). [[User:Helder.wiki|Helder.wiki]] 21:02, 7 April 2014 (UTC)
:::::Yes, but what I meant is; does load.php even support this manner of loading js modules? I've never seen it like this. <span style="font-family:'Trebuchet MS'"> — [[User:Edokter|<span style="color:#008"><i>E</i>dokter</span>]] ([[User talk:Edokter|<span style="color:#080">talk</span>]]) — </span> 21:09, 7 April 2014 (UTC)
::::::Never mind, should work in theory. Only plus is minification though. Doesn't save http requests. <span style="font-family:'Trebuchet MS'"> — [[User:Edokter|<span style="color:#008"><i>E</i>dokter</span>]] ([[User talk:Edokter|<span style="color:#080">talk</span>]]) — </span> 21:14, 7 April 2014 (UTC)
Line 136:
* [[MediaWiki:Gadget-refToolbar.js]]: update the loader with [[Special:Diff/534203339/603903140|these changes]].
* [[MediaWiki:Common.js/edit.js]]: [[Special:Diff/603512406/603903897|remove the code]] which is now in the loader.
* Re-create [[MediaWiki:RefToolbarBase.js]] with<blockquote><syntaxhighlight lang="javascript" enclose="none"inline>mw.log.warn( '[[w:en:MediaWiki:RefToolbarBase.js]] was moved to [[w:en:MediaWiki:Gadget-refToolbarBase.js]].' );</syntaxhighlight><br /><syntaxhighlight lang="javascript" enclose="none"inline>mw.loader.load( '//en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-refToolbarBase.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400' );</syntaxhighlight></blockquote>for the convenience of other wikis which import this page into their site JS or gadgets
[[User:Helder.wiki|Helder.wiki]] 18:02, 12 April 2014 (UTC)
:All that's needed is a nice description. <span style="font-family:'Trebuchet MS'"> — [[User:Edokter|<span style="color:#008"><i>E</i>dokter</span>]] ([[User talk:Edokter|<span style="color:#080">talk</span>]]) — </span> 18:51, 12 April 2014 (UTC)
Line 214:
InterwikiLinks[i].className += ' FL';
InterwikiLinks[i].title = 'This is a featured list in this language.';
</pre> should be added there. I don't know whether it's perfectly okay, but something like this. Cause you can't compare a FL with a FA. Also FLs are not FAs. So something kinda this should be added. Thanks. --'''[[User:Pratyya Ghosh|<span style="color:green;font-family:Comic Sans MS;">Pr<fontspan colorstyle="color:red;">at</fontspan><fontspan colorstyle="color:blue;">yya</fontspan></span>]]''' <sup>[[User_talk:Pratyya Ghosh|<span style="color:orange;font-family:Verdana">'''(Hello!)'''</span>]]</sup> 15:02, 2 August 2014 (UTC)
<!-- End request -->
:This will require a change to {{tl|Link FL}} as well, since now [[Special:Diff/263059992|it uses -fa instead of -fl]]. See also the section [[#Global gadget for LinkFA]]. [[User:Helder.wiki|Helder]] 16:04, 2 August 2014 (UTC)
::[[User:Helder.wiki|Helder]] it's not a very big problem changing {{tl|Link FL}}. But can't this be changed? I mean can't fl be added to the mediawiki page?--'''[[User:Pratyya Ghosh|<span style="color:green;font-family:Comic Sans MS;">Pr<fontspan colorstyle="color:red;">at</fontspan><fontspan colorstyle="color:blue;">yya</fontspan></span>]]''' <sup>[[User_talk:Pratyya Ghosh|<span style="color:orange;font-family:Verdana">'''(Hello!)'''</span>]]</sup> 13:10, 3 August 2014 (UTC)
:::[[User:Helder.wiki|Helder]] Do you think that [[Template:Link FL]] really works after adding "-fl" there? I believe to do that you need to change the MediaWiki:Commons.js first, then it can be changed. --'''[[User:Pratyya Ghosh|<span style="color:green;font-family:Comic Sans MS;">Pr<fontspan colorstyle="color:red;">at</fontspan><fontspan colorstyle="color:blue;">yya</fontspan></span>]]''' <sup>[[User_talk:Pratyya Ghosh|<span style="color:orange;font-family:Verdana">'''(Hello!)'''</span>]]</sup> 13:34, 6 August 2014 (UTC)
::::If English Wikipedia community wants to style interwikis to featured lists differently (that should probably be discussed elsewhere, to get consensus), this is what is needed in the technical side:
::::* <del>Use the current version of the gadget</del><ins>Done</ins>
Line 300:
if (m) {
 
// if that would be clearer. <ttsamp>[[User:PC-XT|—PC]][[User talk:PC-XT|-XT]][[Special:Contribs/PC-XT|+]]</ttsamp> 17:00, 22 September 2014 (UTC)
 
== Replacing Wikiminiatlas.js with OSM.js ==
Line 323:
::'''Support'''. We need better ways to provide geographic information (i.e. maps) in infoboxes than we have currently, and this proposal seems to be a step in the right direction. I see this as a basic need, not optional, thus not simply a gadget. --<small>[[User:Elekhh|ELEKHH]]<sup>[[User talk:Elekhh|T]]</sup></small> 01:25, 11 October 2014 (UTC)
: Support '''as a default-enabled gadget'''. We had the exact same functionality added on the Polish Wikipedia as a default gadget some years ago ([[:pl:MediaWiki:Gadget-map-toggler.js]]; limited by design to two maps only; see e.g. [[:pl:Kraków]]) and no one had ever complained after accidentally disabling it. We even have the styling of the main page implemented as a default-on gadget ([[:pl:MediaWiki:Gadget-main-page.css]]) and no one has problems with it either (I'd make it always-enabled if it was possible, though). I have no reasons to suspect the community here is stupider than the one there and I believe they can deal with it. [[User:Matma Rex|Matma Rex]] <small>[[User talk:Matma Rex|talk]]</small> 08:04, 11 October 2014 (UTC)
:'''Support''' as default-enabled gadget, with an appropriate description so users know what it does <ttsamp>[[User:PC-XT|—PC]][[User talk:PC-XT|-XT]][[Special:Contribs/PC-XT|+]]</ttsamp> 19:39, 15 October 2014 (UTC)
:I think using OSM.js (see below) is a better solution than cluttering up already cluttered infoboxes. [[User:MoreTomorrow|MoreTomorrow]] ([[User talk:MoreTomorrow|talk]]) 06:35, 20 February 2015 (UTC)
::{{ping|MoreTomorrow}} This does something totally different than OSM.js. [[User:Jackmcbarn|Jackmcbarn]] ([[User talk:Jackmcbarn|talk]]) 19:29, 1 March 2015 (UTC)