diff --git a/script/postprocess.js b/script/postprocess.js index dc37784..67e8f45 100644 --- a/script/postprocess.js +++ b/script/postprocess.js @@ -1,10 +1,17 @@ window.onload = function(){ - // Convert ISO8601 To UTC/ + // Fix button follow + let follow = document.querySelector('#follow'); + feedUrl = location.href.replace(/^https?:/, 'feed:'); + follow.href = feedUrl; + follow.onclick = window.open(feedUrl, "_self"); + // Fix button subtome + document.querySelector('#subtome').href='https://www.subtome.com/#/subscribe?feeds='+location.href; + // Convert ISO8601 To UTC for (let element of document.querySelectorAll('#articles > ul > li > div > h4, #feed > #header > h2#subtitle.date')) { let timeStamp = new Date(element.textContent); element.textContent = timeStamp.toUTCString(); } - // Parse Markdown/ + // Parse Markdown for (let element of document.querySelectorAll('#articles > ul > li > div > p')) { let markDown = element.textContent element.innerHTML = marked.parse(markDown); diff --git a/xsl/atom_as_xhtml.xsl b/xsl/atom_as_xhtml.xsl index c59b7b7..02ee0d5 100644 --- a/xsl/atom_as_xhtml.xsl +++ b/xsl/atom_as_xhtml.xsl @@ -64,18 +64,18 @@ xmlns:atom='http://www.w3.org/2005/Atom'>
- + Follow - - - https://www.subtome.com/#/subscribe?feeds= + + + javascript:location.href='https://www.subtome.com/#/subscribe?feeds='+location.href; - + ( function(btn){ var z=document.createElement('script');