0.0.40
This commit is contained in:
@@ -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++
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user