Program FREELink

You have to remove/comment the following code to test this issue:

for (const link of document.querySelectorAll('a[href^="http"]')) {
  //mod = init(link);
  mod = init(link.href, link.outerText);
  if (mod) {
    link.href = mod

The following event delegator doesn't work in some cases (see below).

// /questions/29896128/add-event-listener-on-every-link
// mouseover isn't available when only keyboard is in use
// try also infocus, focus or similar
//document.body.addEventListener("click", function(e) {
document.body.addEventListener("mouseover", function(e) { // mouseover works with keyboard too
  if ( && == "A") {
    mod = init(,;
    if (mod) { = mod;

Hyperlinks nested inside and wrap other elements (or a single element?) are not affected.

<a href="" rel="noreferrer">
<img alt="Bq-paella-installation-tutorial.jpg" src="/images/thumb/c/ce/Bq-paella-installation-tutorial.jpg/256px-Bq-paella-installation-tutorial.jpg" decoding="async" width="256" height="144" srcset="/images/thumb/c/ce/Bq-paella-installation-tutorial.jpg/384px-Bq-paella-installation-tutorial.jpg 1.5x, /images/thumb/c/ce/Bq-paella-installation-tutorial.jpg/512px-Bq-paella-installation-tutorial.jpg 2x">


<div id="downloads" class="clearfix" align="center">
 <a href="" id="download-zip" class="button" rel="noreferrer"><span>Download xlunch &nbsp;&nbsp;</span></a>
 <a href="" id="download-tar-gz" class="button" rel="noreferrer"><span>Download xlunch v4.7.4.tar.gz &nbsp;&nbsp;</span></a>
 <a href="" id="view-on-github" class="button" rel="noreferrer"><span>View on GitHub &nbsp;&nbsp;</span></a>


Please help.