MediaWiki:Gadget-tradLink.js: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
-escape che non fanno nulla e try{} dalla dubbia utilità |
m erano giuste prima |
||
Riga 103:
var lingue = getLingue();
var toTrad = mw.html.escape( $( '#wpTextbox1' ).textSelection( 'getSelection' ) )
selStart = document.getElementById( 'wpTextbox1' ).selectionStart,▼
selEnd = document.getElementById( 'wpTextbox1' ).selectionEnd;▼
$.getJSON( "https://" + lingue[ cod ] + ".wikipedia.org/w/api.php?callback=?", {
action: "query",
Riga 115 ⟶ 113:
},
function( data ) {
▲ var selStart = document.getElementById( 'wpTextbox1' ).selectionStart,
▲ selEnd = document.getElementById( 'wpTextbox1' ).selectionEnd;
if ( typeof( data ) != "undefined" &&
typeof( data.query ) != "undefined" &&
| |||