更新 theme/js/page.js
Build and Publish / Run (push) Successful in 5m16s
Details
Build and Publish / Run (push) Successful in 5m16s
Details
This commit is contained in:
parent
45b959e6ef
commit
8908dd550a
|
@ -40,13 +40,13 @@ function changePage(url) {
|
||||||
|
|
||||||
var old_tag = document.getElementsByClassName("mdui-prose")[0];
|
var old_tag = document.getElementsByClassName("mdui-prose")[0];
|
||||||
var old_topbar_tag = document.getElementsByClassName("topbar")[0];
|
var old_topbar_tag = document.getElementsByClassName("topbar")[0];
|
||||||
var old_navcard_tag = document.getElementById("navcard");
|
var old_navcard_tag = document.getElementsByClassName("navcard")[0];
|
||||||
var virtualtag = document.createElement('div');
|
var virtualtag = document.createElement('div');
|
||||||
virtualtag.insertAdjacentHTML('beforeend', xhr.responseText);
|
virtualtag.insertAdjacentHTML('beforeend', xhr.responseText);
|
||||||
var title = virtualtag.getElementsByTagName("title")[0].innerText;
|
var title = virtualtag.getElementsByTagName("title")[0].innerText;
|
||||||
old_tag.innerHTML = virtualtag.getElementsByClassName("mdui-prose")[0].innerHTML;
|
old_tag.innerHTML = virtualtag.getElementsByClassName("mdui-prose")[0].innerHTML;
|
||||||
old_topbar_tag.innerHTML = virtualtag.getElementsByClassName("topbar")[0].innerHTML;
|
old_topbar_tag.innerHTML = virtualtag.getElementsByClassName("topbar")[0].innerHTML;
|
||||||
old_navcard_tag.innerHTML = virtualtag.getElementById("navcard").innerHTML;
|
old_navcard_tag.innerHTML = virtualtag.getElementsByClassName("navcard")[0].innerHTML;
|
||||||
|
|
||||||
var elements = document.querySelectorAll('[active]');
|
var elements = document.querySelectorAll('[active]');
|
||||||
elements.forEach(element => {
|
elements.forEach(element => {
|
||||||
|
|
Reference in New Issue