Utente:Tino/TradottoDa.js: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
Nessun oggetto della modifica |
Nessun oggetto della modifica |
||
Riga 15:
$(function() {
$('#wpTextbox1').keydown(function(e) {
if (!e.altKey && !e.shiftKey && !e.metaKey &&
e.ctrlKey && e.keyCode === 89 /* "y" key */ &&
mw.config.get('wgNamespaceNumber') ===
var lang, cursorPosition;
Riga 36 ⟶ 35:
'format': 'json',
'action': 'wbgetentities',
'sites':
'titles': page,
'props': 'sitelinks',
Riga 52 ⟶ 51:
];
var text = lang + '|';
var index;
Riga 86 ⟶ 85:
text += page.revisions[0].revid;
// close template
text += '}}
// insert template
inputArea.textSelection('setSelection', {start: cursorPosition - 2, end: cursorPosition});
inputArea.textSelection('encapsulateSelection', {peri: text, replace: true});
}
}
|