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