So basically, I want to only call some script if the URL does not equal blogs.html
For example, these parameters should NOT call the script:
mydomains.com/blogs
mydomains.com/blogs.html
This parameters should call the script:
mydomains.com/blogs/child-page.html
mydomains.com/blogs/another-page
mydomains.com/blogs.html/testin-page.html
mydomains.com/page.html
mydomains.com
I have attempted something like this, although it does not seem to work since blogs.html and blogs are still within the URL.
if(!document.URL.indexOf("blogs.html") >= 0 && !document.URL.indexOf("blogs") >= 0)
{
other script here
}
Is there any way that I can fix this?
ifstatement, there will only be 1 tiny bit of code that will be blocking a div.