better inclusion comments

This commit is contained in:
2019-10-14 12:31:44 +02:00
parent 056cbd4be2
commit 80bf2b4517
7 changed files with 48 additions and 7 deletions

View File

@@ -1,14 +1,14 @@
$(document).ready(function() {
// check if we show a blog post or not
var isArticle = /\/?articles\/\d\d\d\d\/\d\d\/\d\d\/.+$/.test(RelPermalink);
// check if we show a blog post or not. You might have to adapt this
var isArticle = /\/?blog\/\d\d\d\d\/.+$/.test(RelPermalink);
if (isArticle === false) {
console.log("Not a blog post, no need to search for comments");
return;
}
$.ajax({
url: "https://www.schiessle.org/mastodon.comments/getcomments.php",
url: "/comments/getcomments.php",
type: "get",
data: {
search : RelPermalink