Trying ALL endpoints until we find the post - Client-side JavaScript version
IMPROVED: Now searches for the FULL URL, not just extracted IDs