MediaWiki:Gadget-tradLink.js: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
l'encoding viene fatto da getJSON, comunque servirebbe rawurlencode, non html.escape |
fix vari |
||
Riga 1:
/**
* Considera il testo selezionato come il titolo di una voce straniera, e lo
*
*
* Autore : [[:it:User:Jalo]]
Riga 10:
*/
/* global mediaWiki, jQuery
( function( mw, $ ) {
'use strict';
Riga 37:
$( '<legend>' ).text( "Elenco" ).appendTo( $fieldset );
var count = 1;
lingue.forEach( function(
$( '<label>' )
.attr( 'for', id )
.text( "Alt+" + count + ': ' )
.appendTo( $fieldset );
$fieldset▼
▲ .append( $( '<input/>' )
.attr( 'id', id )
.attr( 'type', 'text' )
.attr( 'size', 3 )
.attr( 'value', ( val || '' ) )
▲ $fieldset
.append( $input )
.append( '<br/>' );
count++;
} );
// show the dialog
var
OKText = 'OK',
var
$dialog.find( 'input:text' ).each( function() {
} );
var d = new Date();
d.setTime( d.getTime() + ( 20 * 365 * 24 * 60 * 60 * 1000 ) ); // 20 years
Riga 69 ⟶ 68:
$( this ).dialog( 'close' );
};
$( this ).dialog( 'close' );
};
Riga 78 ⟶ 77:
modal: true,
zIndex: 10000,
buttons:
} );
}
Riga 95 ⟶ 94:
return value !== ""
? value.split( ',' ).slice( 0, 9 )
: [ 'en', 'nl', 'de', 'sv', 'fr', 'ru', 'es', 'war', 'vi' ];
Riga 136 ⟶ 134:
}
}
var noLinkLabel = "[NO LINK]";
$( '#wpTextbox1' ).textSelection( 'encapsulateSelection', {
pre: "",
post:
} );
document.getElementById( 'wpTextbox1' ).selectionStart = selEnd;
document.getElementById( 'wpTextbox1' ).selectionEnd = selEnd +
} );
}
| |||