结发受长生 f7b8721ec6 精简js
2019-05-09 23:10:12 +08:00

20 lines
693 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

function init() {
// 由于hexo分页不支持手工美化
var $nav = document.querySelector('#page-nav')
if ($nav && !document.querySelector('#page-nav .extend.prev')) {
$nav.innerHTML = '<a class="extend prev disabled" rel="prev">&laquo; Prev</a>' + $nav.innerHTML
}
if ($nav && !document.querySelector('#page-nav .extend.next')) {
$nav.innerHTML = $nav.innerHTML + '<a class="extend next disabled" rel="next">Next &raquo;</a>'
}
// 目录序号
if (window.themeConfig && window.themeConfig.toc_hide_index) {
let $a = document.querySelectorAll('.toc-number')
Array.prototype.forEach.call($a, function($em){
$em.style.display = 'none'
})
}
}
export default { init }