0.0.146 dynamic replace title
This commit is contained in:
@@ -58,9 +58,8 @@ function renderContent (el=null) {
|
||||
data: JSON.stringify(data),
|
||||
success: function(data){
|
||||
document.querySelector(".content").innerHTML = data.html
|
||||
document.title = data.title
|
||||
window.scrollTo(0, 0);
|
||||
let lang = getLang()
|
||||
window.scrollTo(0, 0);
|
||||
replaceHrefOnOnclick()
|
||||
if (el){
|
||||
history.pushState({
|
||||
@@ -70,6 +69,9 @@ function renderContent (el=null) {
|
||||
`/${lang}/section/${el.dataset['url']}/`
|
||||
)
|
||||
}
|
||||
if (window.location.href !== `${window.location.origin}/${lang}/`){
|
||||
document.title = data.title
|
||||
}
|
||||
resetSlider()
|
||||
autoPlaySlider()
|
||||
replace_select_language()
|
||||
|
||||
Reference in New Issue
Block a user