diff options
author | Doge <[email protected]> | 2021-05-13 18:53:19 +0800 |
---|---|---|
committer | Doge <[email protected]> | 2021-05-13 18:53:19 +0800 |
commit | 5e2ae7733ca351ae57fc4fd756ec03f4bc0fc672 (patch) | |
tree | dd2960c2caadf4cfaea4f7a6b5513adfc5bcf2c7 /scripts/meta.js | |
parent | 7dcd9aea80061bdcdbafb172e478213a962c2f6c (diff) | |
download | chromate-5e2ae7733ca351ae57fc4fd756ec03f4bc0fc672.tar.gz chromate-5e2ae7733ca351ae57fc4fd756ec03f4bc0fc672.tar.bz2 chromate-5e2ae7733ca351ae57fc4fd756ec03f4bc0fc672.zip |
Add rss auto discovery and fix some bugs with rss
Diffstat (limited to 'scripts/meta.js')
-rw-r--r-- | scripts/meta.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/meta.js b/scripts/meta.js index 9b4a779..046e939 100644 --- a/scripts/meta.js +++ b/scripts/meta.js @@ -31,6 +31,7 @@ hexo.extend.tag.register('timeline', function (_args) { let page = this; if (!(page.podcast && page.podcast.chapters)) return; + const urler = hexo.extend.helper.get("full_url_for").bind(hexo); return ejs.render(` <ul> <% (page.podcast.chapters).forEach(function(item) { %> @@ -42,9 +43,13 @@ hexo.extend.tag.register('timeline', function (_args) { const second = Math.floor(timestamp % 60); const viewstr = String(hour).padStart(2, '0') + ':' + String(minute).padStart(2, '0') + ':' + String(second).padStart(2, '0'); %> - <li class="is-family-monospace"><a href="#t=<%= viewstr %>" onclick="eval('player.seek(<%= timestamp %>)')"><%= viewstr %></a> <%= title %></li> + <li class="is-family-monospace"> + <a href="<%= urler(page.path) %>#t=<%= viewstr %>" onclick="eval('player.seek(<%= timestamp %>)')"> + <%= viewstr %> + </a><%= title %> + </li> <% }); %> </ul> ` - , {page: page}); + , {page: page, urler: urler}); }) |