$(document).ready(() => {
    $("a[id^='footnote_source_']").each((idx, elm) => {
      var id = elm.id.slice(16);
      var footnote = $("#" + id).clone();
      footnote.children("a").remove();
      // footnote.remove(".a");
      var popup;
      $(elm).mouseover(() => {
        popup = footnote.css({
          position: "absolute",
          scale: "125%",
          top: $(elm).offset().top,
          left: $(elm).offset().left + $(elm).width() - 30,
          "border-style": "solid",
          padding: "5px",
          "padding-bottom": "2px",
          "z-index": 1000
        }).appendTo("body");
      }).mouseout(() => {
        $(popup).remove();
      });
    });
  });
