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

teste
imported>Jaideraf
Sem resumo de edição
imported>Jaideraf
(teste)
let tag = "";
let tagFromDropdown = "";
 
function createMarcFieldHelpLinks() {
"use strict";
$(".tagInput").each(function() {
let marcFieldHelpLink = $("<a>", {
target: "_blank",
text: "(?)"
});
$(this).closest("table").find(".marcFieldHelpLink").html(marcFieldHelpLink);
$(this).closest("table").find(".marcFieldHelpLink").hover(function() {
 
// find the tag value from the chosen dropdown
tagFromDropdown = $(this).closest(".instanceMain").find(".select2-selection__rendered").attr("title");
tagFromDropdown = tagFromDropdown.substring(0, 3);
 
// build the URL
marcFieldHelpLink.attr("title", "Documentação do campo " + tagFromDropdown);
if (window.location.href.match(/A\d{6}/) ||
window.location.href.match(/AutRecord/)) {
marcFieldHelpLink.attr("href", "http://marc.febab.org/a" + tagFromDropdown);
} else {
marcFieldHelpLink.attr("href", "https://www.loc.gov/marc/bibliographic/bd" + tagFromDropdown + ".html");
}
});
});
}
 
function createAuthorityLinks() {
Usuário anônimo