hexo-theme-stellar/source/js/services/mdrender.js

10 lines
326 B
JavaScript
Raw Normal View History

2024-02-12 23:07:56 +08:00
utils.jq(() => {
const els = document.getElementsByClassName('stellar-marked-api');
for (var i = 0; i < els.length; i++) {
const el = els[i];
const src = `${el.getAttribute('src')}?t=${new Date().getTime()}`;
utils.request(el, src, function(data) {
el.innerHTML = marked.parse(resp.data);
});
}
});