✨ Close #93,#36 Add music short code.
This commit is contained in:
@@ -65,6 +65,7 @@ NexT.boot.refresh = function() {
|
||||
|
||||
if (NexT.CONFIG.page.toc) NexT.utils.registerSidebarTOC();
|
||||
if (NexT.CONFIG.page.expired) NexT.utils.calPostExpiredDate();
|
||||
if (NexT.CONFIG.page.music) NexT.utils.registerAPlayer();
|
||||
|
||||
NexT.utils.registerCopyCode();
|
||||
NexT.utils.registerImageViewer();
|
||||
|
||||
@@ -7,6 +7,16 @@ HTMLElement.prototype.wrap = function (wrapper) {
|
||||
};
|
||||
|
||||
NexT.utils = {
|
||||
registerAPlayer: function () {
|
||||
this.getStyle(
|
||||
NexT.utils.getCDNResource(NexT.CONFIG.page.aplayer.css)
|
||||
);
|
||||
|
||||
NexT.CONFIG.page.aplayer.js.forEach(function (js) {
|
||||
NexT.utils.getScript(NexT.utils.getCDNResource(js), true);
|
||||
});
|
||||
|
||||
},
|
||||
calPostExpiredDate: function() {
|
||||
const postMetaDom = document.querySelector('.post-meta-container');
|
||||
let postTime = postMetaDom.querySelector('time[itemprop="dateCreated datePublished"]').getAttribute("datetime");
|
||||
|
||||
Reference in New Issue
Block a user