0.0.40
This commit is contained in:
@@ -76,14 +76,16 @@ function replaceHrefOnOnclick () {
|
|||||||
elements.forEach(function (){
|
elements.forEach(function (){
|
||||||
let cur_el = elements[i]
|
let cur_el = elements[i]
|
||||||
if (cur_el.attributes.hasOwnProperty("href")){
|
if (cur_el.attributes.hasOwnProperty("href")){
|
||||||
|
cur_el.setAttribute("onclick",`renderContent(this)`)
|
||||||
let str = cur_el.outerHTML
|
let str = cur_el.outerHTML
|
||||||
let str_f_replace = cur_el.href
|
let str_f_replace = cur_el.href
|
||||||
str_f_replace = str_f_replace.replace(`${window.location.origin}`,'')
|
str_f_replace = str_f_replace.replace(`${window.location.origin}`,'')
|
||||||
str_f_replace = `href="${str_f_replace}"`
|
str_f_replace = `href="${str_f_replace}"`
|
||||||
str = str.replace(str_f_replace,'')
|
str = str.replace(str_f_replace,'')
|
||||||
str = str.replace('"target="_blank""','')
|
str = str.replace('"target="_blank""','')
|
||||||
|
|
||||||
cur_el.outerHTML = str
|
cur_el.outerHTML = str
|
||||||
cur_el.setAttribute("onclick",`renderContent(this)`)
|
|
||||||
}
|
}
|
||||||
i++
|
i++
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user