Need some help with custom jQuery please

I'm using a directory theme that outputs both taxonomies and single listings dynamically on the same page, like so:
domain.com/main-directory
domain.com/main-directory/taxonomy
domain.com/main-directory/taxonomy/individual-listing

I'm am trying to have some textual content appear only on the first taxonomy "display" of that page. So I've added some paragraph elements with unique selectors, yet they all appear on all taxonomy & single listing URLs, because all the above URLs use the same page and HTML elements. So I can't use just good ol' CSS to hide stuff on inner "pages", so need to use jQuery... or any other option you can think of.

In a couple of live chat sessions, this is what we have tried:

if (document.location != 'https://domain.com/main-directory/') {
document.querySelector('#first-intro').style.display = 'none';
document.querySelector('#second-intro').style.display = 'none';
document.querySelector('#third-intro').style.display = 'none';
}

But just can't seem to get it to work on the 2nd of the inner "pages". The above allows the specified elements to display as they should on the "main" display - https://domain.com/main-directory/ - and hides them on the 2nd "display - domain.com/main-directory/taxonomy - but they stubbornly refuse to be hidden on the 3rd "display" - domain.com/main-directory/taxonomy/individual-listing