Utente:FRacco/sandbox.js: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
ottimizzazione del codice con controllo completo degli errori
m fix minori e commenti
 
Riga 6:
 
/*
* Workaround for [[bugzillaphabricator:708]] via [[commons:Template:InterProject]].
* Originally based on code from [[wikt:de:MediaWiki:Common.js]] by
* by [[wikt:de:User:Melancholie]], cleaned up and modified for compatibility
* cleaned up and modified for compatibility with the Vector skin.
* @source: [[commons:MediaWiki:InterProject.js]]
* @maintainer: [[commons:User:Krinkle]]
Riga 60:
// interproject inclusion without wikibase otherprojects
var langBox = document.getElementById( 'p-lang' );
var panellegacyPanel;
 
if ( !langBox ) {
panel// =legacy langBox.parentNode;skins
} else {
// stupid incompatible skins...
var panelIds = [ 'mw-panel', 'panel', 'column-one', 'mw_portlets' ];
for ( var i = 0; !panellegacyPanel && i < panelIds.length; i++ ) {
panellegacyPanel = document.getElementById( panelIds[i] );
}
// can't find a place for the portlet, try to undo hiding
if ( !panellegacyPanel ) {
interPr.style.display = 'block';
sisterPr.style.display = 'block';
Line 91 ⟶ 89:
 
if ( langBox ) {
panellangBox.parentNode.insertBefore( interProject, langBox );
} else {
panellegacyPanel.appendChild( interProject );
}