Forum Moderators: open
I need to do the following inside of a small piece of javascript:
1. Check if page url contains the text "http://www.example.com/page-to-exclude" (other formats of the URL like http://www.example.com/page-to-exclude?para=1¶=2 also exist)
1a If no: use the following code:
- code 1
1b If yes:
- do nothing
Is it possible to check through javascript if a url contains a specific piece of text (part of a string) like in the scenario above?
Many thanks!