diff options
Diffstat (limited to 'bootstrap/comments/frontend/appendrss.js')
-rw-r--r-- | bootstrap/comments/frontend/appendrss.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/bootstrap/comments/frontend/appendrss.js b/bootstrap/comments/frontend/appendrss.js new file mode 100644 index 0000000..2913e94 --- /dev/null +++ b/bootstrap/comments/frontend/appendrss.js @@ -0,0 +1,17 @@ +// Appends HashOver comments RSS feed to page head (appendrss.js) +HashOver.prototype.appendRSS = function () +{ + // Get the page head + var head = document.head || document.getElementsByTagName ('head')[0]; + + // Create link element for comment RSS feed + var rss = this.elements.create ('link', { + rel: 'alternate', + href: this.setup['http-root'] + '/api/rss.php?url=' + encodeURIComponent (this.instance['page-url']), + type: 'application/rss+xml', + title: 'Comments' + }); + + // Append comment RSS feed link element to page head + head.appendChild (rss); +}; |