feat: support defining Mastodon toot URL

This commit is contained in:
2026-02-24 11:55:42 +01:00
parent 330925edce
commit 67d92eba01
4 changed files with 100 additions and 22 deletions

View File

@@ -28,12 +28,18 @@ $(document).ready(function() {
debugLog('Searching for comments for: ' + RelPermalink);
// Check if a direct Mastodon toot URL is provided
var ajaxData = { search: RelPermalink };
if (MastodonTootUrl && MastodonTootUrl !== "") {
// Pass the full URL to PHP so it can extract instance and ID
ajaxData.toot_url = MastodonTootUrl;
debugLog('Using predefined Mastodon toot URL: ' + MastodonTootUrl);
}
$.ajax({
url: "/comments/getcomments.php",
type: "get",
data: {
search : RelPermalink
},
data: ajaxData,
success: function(data) {
// Enable debug logging if backend has debug enabled
if (data.debug === true) {