diff --git a/static/aerbimJS.js b/static/aerbimJS.js index a59d5d7..47c5984 100644 --- a/static/aerbimJS.js +++ b/static/aerbimJS.js @@ -76,14 +76,16 @@ function replaceHrefOnOnclick () { elements.forEach(function (){ let cur_el = elements[i] if (cur_el.attributes.hasOwnProperty("href")){ + cur_el.setAttribute("onclick",`renderContent(this)`) let str = cur_el.outerHTML let str_f_replace = cur_el.href str_f_replace = str_f_replace.replace(`${window.location.origin}`,'') str_f_replace = `href="${str_f_replace}"` str = str.replace(str_f_replace,'') str = str.replace('"target="_blank""','') + cur_el.outerHTML = str - cur_el.setAttribute("onclick",`renderContent(this)`) + } i++ })