hexo-theme-keep/source/js/main.js

8 lines
364 B
JavaScript
Raw Normal View History

console.log('this is main.js');
2020-03-15 15:45:38 +08:00
(() => {
// 选择分页器元素里面的 a 标签,但不包含 .page-number给指定元素追加类 btn 和 设置属性 role=navigation
document.querySelectorAll('.article-post .paginator a:not(.page-number)').forEach(e => {
e.classList.add('btn');
e.setAttribute('role', 'navigation');
});
})();