文章顶部导航栏显示文章标题
This commit is contained in:
parent
35a41d33bb
commit
990272cd19
|
@ -165,8 +165,8 @@ function getContrastYIQ(hexcolor) {
|
||||||
//导航栏文章
|
//导航栏文章
|
||||||
function navTitle() {
|
function navTitle() {
|
||||||
var titlevalue = document.title;
|
var titlevalue = document.title;
|
||||||
var simptitle = titlevalue.replace(' | XXXX', '')
|
var postName = document.getElementsByClassName("post-title")[0];
|
||||||
document.getElementById("page-name-text").innerHTML = simptitle;
|
document.getElementById("page-name-text").innerHTML = postName.innerText;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.onload = function () {
|
window.onload = function () {
|
||||||
|
|
Loading…
Reference in New Issue