feat: support defining Mastodon toot URL
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user