MediaWiki:MARCimporter.js: mudanças entre as edições

sem sumário de edição
imported>Jaideraf
m (uma edição)
Sem resumo de edição
 
(Uma revisão intermediária por um outro usuário não está sendo mostrada)
/* jshint esversion: 10 */
$(document).ready(function(){
const mainFunc = function () {
$("#wpRunQuery").click(function(){
const prepareRecordBtn = document.body.querySelector('#wpRunQuery');
// when query, substitute | by $ in the texarea
$("spanprepareRecordBtn.inputSpan").find("textarea").eachaddEventListener('click', function () {
// when query, substitute | by $ in the texareatextarea
let input = $(this).val();
const textarea = document.body.querySelector('textarea');
let normalizedInput = input
textarea.value = textarea.value.replace(/\|/g, "'$"');
});
$(this).val(normalizedInput);
};
});
 
});
document.addEventListener('DOMContentLoaded', function () {
mainFunc();
});