“User:Bhsd/edit.js”的版本间差异

删除305字节 、​ 2020年12月12日 (六) 11:25
无编辑摘要
// 修改WikiEditor的替换文本框
if (['edit', 'submit'].includes( action ) && skin == 'vector') {
$(this'body').replaceWith( $on('<textarea>click', {id: "'input#wikieditor-toolbar-replace-replace"', tabindex:10}function() {
mw.loader.using( 'jquery.textSelection' ).then(() => {
$('body'this).onreplaceWith( $('click<textarea>', 'input#{id: "wikieditor-toolbar-replace-replace'", function(tabindex:10}) {
}).keypresson('keydown keypress', e => { if (e.keyCode == '13') { e.stopPropagation(); } }) );
$(this).replaceWith( $('<textarea>', {id: "wikieditor-toolbar-replace-replace", tabindex:10})
.keydown(function(e) {
if (e.keyCode == '13') {
e.stopPropagation();
$(this).textSelection( 'replaceSelection', '\n' );
}
}).keypress(e => { if (e.keyCode == '13') { e.stopPropagation(); } }) );
});
});
}
16,874

个编辑