diff options
| author | Doge <guiqiqi187@gmail.com> | 2021-05-13 19:20:10 +0800 | 
|---|---|---|
| committer | Doge <guiqiqi187@gmail.com> | 2021-05-13 19:20:10 +0800 | 
| commit | 08c1c79cb6062af2e4e3095e8865282016fad1f7 (patch) | |
| tree | 46a9ebdb132837f960ac7fa5b61a028e2786b0ef /scripts | |
| parent | d811248e066774fec4fe334bf3d00ef2300a822b (diff) | |
| download | chromate-08c1c79cb6062af2e4e3095e8865282016fad1f7.tar.gz chromate-08c1c79cb6062af2e4e3095e8865282016fad1f7.tar.bz2 chromate-08c1c79cb6062af2e4e3095e8865282016fad1f7.zip | |
Try to fix error
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/feed.js | 8 | ||||
| -rw-r--r-- | scripts/meta.js | 2 | 
2 files changed, 7 insertions, 3 deletions
| diff --git a/scripts/feed.js b/scripts/feed.js index 11e59cb..ef23998 100644 --- a/scripts/feed.js +++ b/scripts/feed.js @@ -33,10 +33,14 @@ hexo.extend.generator.register("feed", (locals) => {      // Rendering for podcasts      locals.posts.sort('date', -1).each(function (post) {          if (!post.podcast) return; -        let description = post.content.replace(/onclick=".*?"/gi, ''); +        let description = post.content.replace(/onclick=".*?"/gi, '') +            .replace(/class=".*?"/gi, '') +            .replace(/id=".*?"/gi, '').replace(/rel=".*?"/gi, '') +            .replace(/title=".*?"/gi, '').replace(/\n/g, "") +            .replace(/\s+/g, ' ').trim();          feed.addItem({              title: post.title, -            description: description.replace(/>\s+</g, '><', ''), +            description: description,              url: config.url + urler(post.path),              guid: config.url + urler(post.path),              author: post.podcast.authors.join(', '), diff --git a/scripts/meta.js b/scripts/meta.js index 046e939..baf8166 100644 --- a/scripts/meta.js +++ b/scripts/meta.js @@ -44,7 +44,7 @@ hexo.extend.tag.register('timeline', function (_args) {                  const viewstr = String(hour).padStart(2, '0') + ':' + String(minute).padStart(2, '0') + ':' + String(second).padStart(2, '0');              %>              <li class="is-family-monospace"> -                <a href="<%= urler(page.path) %>#t=<%= viewstr %>" onclick="eval('player.seek(<%= timestamp %>)')"> +                <a href="#t=<%= viewstr %>" onclick="eval('player.seek(<%= timestamp %>)')">                      <%= viewstr %>                  </a><%= title %>              </li> | 
