0.0.39
This commit is contained in:
@@ -29,10 +29,14 @@ function sendWidthAjax () {
|
||||
return data
|
||||
}
|
||||
|
||||
function renderContent () {
|
||||
function renderContent (el=null) {
|
||||
let data = sendWidthAjax()
|
||||
let section_button = document.querySelector(".section_btn")
|
||||
data['section_url'] = section_button.dataset['url']
|
||||
if (!el) {
|
||||
let section_button = document.querySelector(".section_btn")
|
||||
data['section_url'] = section_button.dataset['url']
|
||||
} else {
|
||||
data['section_url'] = el.dataset['url']
|
||||
}
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/get_content_for_section/',
|
||||
@@ -79,6 +83,7 @@ function replaceHrefOnOnclick () {
|
||||
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