MediaWiki talk:Common.js/Archive 21: Difference between revisions
Content deleted Content added
m Archiving 2 discussion(s) from MediaWiki talk:Common.js) (bot |
m Archiving 2 discussion(s) from MediaWiki talk:Common.js) (bot |
||
Line 184:
:A better check might be mw.config.get('wgPageContentModel') !== 'wikitext'. [[User:Legoktm|Legoktm]] ([[User talk:Legoktm|talk]]) 23:43, 18 May 2014 (UTC)
::Agreed. [[User:Kaldari|Kaldari]] ([[User talk:Kaldari|talk]]) 00:37, 19 May 2014 (UTC)
== Global gadget for LinkFA ==
{{See also|MediaWiki talk:Common.js/Archive 20#LinkFA is broken|mailarchive:wikitech-ambassadors/2014-July/000827.html}}
Hi!
In the interest of fixing the linkFA code [[meta:Wikidata/Development/Badges#Wikis using badges|in 200+ wikis]], I would like to move the code to [[MediaWiki:Gadget-featured-articles-links.js]] (and its CSS to [[MediaWiki:Gadget-featured-articles-links.css]]?), make it [[Special:Diff/618543438|translateable]], and import that JS file from each other wiki where the feature is used (as happens with HotCat, for example). What do you think? [[User:Helder.wiki|Helder.wiki]] 13:46, 26 July 2014 (UTC)
:I'm all for, but beware that some wiki's might use different images to indicate this state, different classes in the content and have different types of badges. So it might still need quite a bit of 'configuration' in the setup step. —[[User:TheDJ|Th<span style="color: green">e</span>DJ]] ([[User talk:TheDJ|talk]] • [[Special:Contributions/TheDJ|contribs]]) 17:31, 26 July 2014 (UTC)
::Also, I think I noticed that the wikidata team is working on putting some of this info in wikidata, so you might wanna check if this replace action can be prepared for that step as well. —[[User:TheDJ|Th<span style="color: green">e</span>DJ]] ([[User talk:TheDJ|talk]] • [[Special:Contributions/TheDJ|contribs]]) 17:33, 26 July 2014 (UTC)
:::[[m:Wikidata/Development/Badges]], linked by Heldir above, is about that. It would be more logical to host the global gadget at Meta (or Wikidata) IMHO, but doesn't matter that much; it's fine to only use it on wikis which use the default icons. --[[User:Nemo_bis|Nemo]] 17:38, 26 July 2014 (UTC)
::::I added a few TODOs in the comment above the code, but what we have now should be enough to get the feature working again in most wikis.
::::The small disadvantage of moving it on Meta is that it is not used on Meta itself, so it would not be editable by any of the wikis where it is needed (and by hosting it on enwiki we would save an HTTP request at least for users of the biggest Wikipedia). [[User:Helder.wiki|Helder.wiki]] 18:07, 26 July 2014 (UTC)
: Hi, please note that this JavaScript hack is not needed any more because Wikidata will support [[meta:Wikidata/Development/Badges|badges]] soon which will make the JavaScript obsolete. I'll contact you later again how you can make your current styling compatible with the new system. Best regards, -- [[User:Bene*|Bene*]] ([[User talk:Bene*|talk]]) 07:44, 31 July 2014 (UTC)
::@[[User:Bene*|Bene*]]: Until that is available, I'll import the gadget code from wikis where the feature is still brokenm as I did on [[:bi:Special:Diff/32938|bi:MediaWiki:Common.js]]. Will the Wikidata version set a title attribute too? [[User:Helder.wiki|Helder]] 13:42, 3 August 2014 (UTC)
::: Ok, maybe you can give me the list of wikis then which use the new gadget to make migration to wikidata easier? There will also be titles on the li elements based on the label of the badge's item on wikidata. -- [[User:Bene*|Bene*]] ([[User talk:Bene*|talk]]) 22:11, 3 August 2014 (UTC)
::::[[User:Bene*|Bene*]] so far that (biwiki) is the only one, but I can indicate this info in the list on meta-wiki. [[User:Helder.wiki|Helder]] 01:10, 4 August 2014 (UTC)
:::::Thank you, that would be great. -- [[User:Bene*|Bene*]] ([[User talk:Bene*|talk]]) 20:14, 5 August 2014 (UTC)
:{{done}} I just removed the code from [[MediaWiki:Common.js]] and [https://en.wikipedia.org/wiki/Special:Contributions/Helder.wiki?dir=prev&offset=20140808135626&limit=7 enabled the gadget version]. [[User:Helder.wiki|Helder]] 15:35, 8 August 2014 (UTC)
{{ping|Helder.wiki}} What about the images used [[MediaWiki:Gadget-featured-articles-links.css|here]]? Will it be possible to use other ones in other Wikipedias? Or the old code from Common/Vector/Monobook.css etc. will work? --'''[[User:Edgars2007|<span style="color:#FF6600;">Edgars2007</span>]]''' <small>([[User talk:Edgars2007|talk]]/[[Special:Contributions/Edgars2007|contribs]])</small> 23:36, 16 August 2014 (UTC)
:{{reply to|Edgars2007}} if your wiki uses the same classes ("FA", "GA" and "FL"), you can import the CSS from here to get the same icons used on English Wikipedia or keep your previous CSS to use your own custom icons. [[User:Helder.wiki|Helder]] 23:54, 16 August 2014 (UTC)
=== Add Featured List on interwiki ===
{{edit protected|MediaWiki:Common.js|answered=yes}}
<!-- Begin request -->
Dear sysops. I think something like
<pre>
if ( document.getElementById( className + '-fl' ) ) {
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<font color="red">at</font><font color="blue">yya</font></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<font color="red">at</font><font color="blue">yya</font></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<font color="red">at</font><font color="blue">yya</font></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>
::::* Change the "id" in the template
::::* Define the style for the class <code>.FL</code> used in the links (similar to what is currently done for <code>.FA</code> and <code>.GA</code> on [[MediaWiki:Gadget-featured-articles-links.css]])
::::[[User:Helder.wiki|Helder]] 13:43, 6 August 2014 (UTC)
=== Announced JavaScript change for badges implementation ===
Hi! I want to let you know that in near future badges will be deployed on Wikidata and the Wikipedias. They help us with displaying the good and featured article icons next to the sitelinks and will replace the javascript hack which is used at the moment together with the Link GA and Link FA templates. To avoid an overlap where the current system and the new feature conflict, I will add a minor fix to your Common.js which adds the class names to the interwiki links. This is part of my task as a [//meta.wikimedia.org/w/index.php?title=Steward_requests/Global_permissions&oldid=9433288#Global_editinterface_for_Bene.2A global edit interface editor] for the Wikidata team. Thanks, [[User:Bene*|Bene*]] ([[User talk:Bene*|talk]]) 10:19, 7 August 2014 (UTC)
:@[[User:Bene*|Bene*]]: What will be the change? [[User:Helder.wiki|Helder]] 20:19, 7 August 2014 (UTC)
:: There will be a simple check in the if-clause which tests if the badge is already tagged by the new system or we have to apply the old procedure. -- [[User:Bene*|Bene*]] ([[User talk:Bene*|talk]]) 07:24, 8 August 2014 (UTC)
== Protected edit request on 20 September 2014: [[MediaWiki:Common.js/IEFixes.js]] ==
{{edit protected|MediaWiki:Common.js/IEFixes.js|answered=yes}}
Since JavaScript has already been disabled for IE 7 and below ([[gerrit:157774]]), could we remove <code>else if ( profile.versionNumber <= 7 )</code> branch? [[User:Chmarkine|Chmarkine]] ([[User talk:Chmarkine|talk]]) 04:05, 20 September 2014 (UTC)
:{{Done}}. <code style="white-space:nowrap">-- [[[[User:Edokter|<span style="color:#006">User:Edokter</span>]]]] {{[[User talk:Edokter|<span style="color:#060">talk</span>]]}}</code> 21:32, 20 September 2014 (UTC)
{{ping|Edokter}} Thank you! Also I just realized that the <code>ieCSS</code> can be updated too. For the first rule, <code>@media print</code> is not supported by IE 8 and below [http://caniuse.com/#feat=css-mediaqueries]. So if the "line-height" issue doesn't exist in IE 9 and above, I think we can just remove it, since it won't work on old IE anyway. Also do these bugs apply to latest versions of IE? If not, I suggest we change [[MediaWiki:Common.js]] Line 119 from
*<code>if ( $.client.profile().name === 'msie' )</code>
to
*<code>if ( ($.client.profile().name === 'msie') && ($.client.profile().versionNumber < 11) )</code>
The "11" can be replaced with the version number where the three bugs do not exist. In this way, some IE users don't have to load one more file if they don't need it. [[User:Chmarkine|Chmarkine]] ([[User talk:Chmarkine|talk]]) 04:03, 21 September 2014 (UTC)
:I don't know ie IE 8-11 have the print bug, so I'm leaving it for now; someone more print-knowledgable wil have to test this. IEFixes.js is for all version of IE, But if you are absolutely certain IE11 does not need any fix, we may add the check. <code style="white-space:nowrap">-- [[[[User:Edokter|<span style="color:#006">User:Edokter</span>]]]] {{[[User talk:Edokter|<span style="color:#060">talk</span>]]}}</code> 07:07, 21 September 2014 (UTC)
::{{ping|User:Edokter}} IE 8 and above don't have the print bug. The original discussion about this bug is [[Wikipedia:Village pump (technical)/Archive 57#Print issues|here]] where [[User:Gadget850|Gadget850]] said "it does not happen in FireFox, Chrome or ''Internet Explorer 8rc1''". I also tried printing on IE 8 on XP SP3 without IEFixes.js, and there was no issue. So it will cause no problem to remove the line-height CSS rule. I am not very sure about the next two bugs, but I think IE11 is fine. [[User:Chmarkine|Chmarkine]] ([[User talk:Chmarkine|talk]]) 23:41, 21 September 2014 (UTC)
:::IE11 prints properly at the moment. Disable it and I will see what happens. <span style="color:Turquoise">''''' [[User:Gadget850|Gadget850]]'''''<sup>[[User talk:Gadget850| ''talk'']]</sup></span> 00:06, 22 September 2014 (UTC)
::::The second and third CSS rules were added by [[User:TheDJ|TheDJ]] in [[Special:Diff/306308090/309473618|this change]] and [[Special:Diff/347581765/348586315|this change]]. A past discussion on the third bug is [[Template talk:Documentation/Archive 4#Problem with right-aligned images|here]]. {{ping|TheDJ}} Are these CSS rules needed for IE11? [[User:Chmarkine|Chmarkine]] ([[User talk:Chmarkine|talk]]) 00:12, 22 September 2014 (UTC)
:::::OK, I think the zoom fix can be removed too, since the "has layout" property has been removed in IE8 ([http://haslayout.net/haslayout source]). [[User:Chmarkine|Chmarkine]] ([[User talk:Chmarkine|talk]]) 01:40, 22 September 2014 (UTC)
:I will disable all CSS form IEFixes.js; The print bug is likely IE7 only, the overflow bug is redundant as nothing seems to use these classes, and I can no longer trigger the bug targeted by the zoom fix in IE8. <code style="white-space:nowrap">-- [[[[User:Edokter|<span style="color:#006">User:Edokter</span>]]]] {{[[User talk:Edokter|<span style="color:#060">talk</span>]]}}</code> 19:35, 14 November 2014 (UTC)
|