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

Content deleted Content added
Shadowbot3 (talk | contribs)
m Automated archival of 2 sections from MediaWiki talk:Common.js
Shadowbot3 (talk | contribs)
m Automated archival of 1 sections from MediaWiki talk:Common.js
Line 154:
 
:This JavaScript code is not meant for installing on other sites. It is purpose-specific to English Wikipedia. What made you think that this is something you should install on another MediaWiki site? If there is something on the site leading people to think this code is ready-made for installation on other sites, it needs to be fixed. [[User talk:Mike Dillon|Mike Dillon]] 21:56, 23 June 2007 (UTC)
<span id="63308125771" />
==Request: mainPageAppendCompleteListLink() rewrite==
I suggest rewriting this function as
function mainPageAppendCompleteListLink() {
addPortletLink('p-lang', 'http://meta.wikimedia.org/wiki/List_of_Wikipedias',
'Complete list', 'interwiki-completelist', 'Complete list of Wikipedias');
var lnk = document.getElementById('interwiki-completelist');
if (lnk) lnk.style.fontWeight = 'bold';
}
and then also removing the code below from [[MediaWiki:Common.css]] ∴ [[User:Alex Smotrov|Alex Smotrov]] 13:53, 19 June 2007 (UTC)
/* Main page fixes */
.interwiki-completelist {
font-weight: bold;
}
 
: I agree with using <code>addPortletLink</code> but don't see why not to use CSS for the styling? —''[[User:Ruud Koot|Ruud]]'' 19:33, 24 June 2007 (UTC)
 
 
::The way I see it, global CSS should be used:
::* for common Mediawiki elements, which are present on almost any page, e.g. portlets, #bodyContent, etc.
::* for things that cannot be done using inline styles, e.g. child selectors, :hover, etc.
::* (maybe) for some templates that are used on ''a lot'' of pages
::One element that appears on only one page imho doesn't deserve to be mentioned in global CSS file ∴ [[User:Alex Smotrov|Alex Smotrov]] 20:23, 24 June 2007 (UTC)
::*
::: I'd agree if this was something in the content-area (which could easily lead to an almost infinite number of CSS stylings) but I consider this link part of the MediaWiki-interface (which are quite finite in their number). Using CSS ''might'' have a (likely negligible) performance benefit, under the assumption the CSS class can be assigned to the element before it is added to the document tree. —''[[User:Ruud Koot|Ruud]]'' 20:29, 24 June 2007 (UTC)
::::Well, if the code was moved into say MainPage.js… but since it's still here — okay, let it be CSS, since CSS ''there'' takes less space than Javascript ''here''. P.S. Don't forget that 'interwiki-completelist' is going to be <tt>id</tt> now, not <tt>class</tt> ∴ [[User:Alex Smotrov|Alex Smotrov]] 22:29, 27 June 2007 (UTC)