Posts

Showing posts with the label window.location

How to implement wildcards for window.location.pathname [duplicate]

How to implement wildcards for window.location.pathname [duplicate] This question already has an answer here: I have the following code and I would like to make the function work on any URL containing "blog" instead of a specific URL. Please help me with the correct syntax, thanks. window.setTimeout(function() { if (window.location.pathname != '/home/legal-documentation' && window.location.pathname != '/home/blog/australian-business-news' ) { erOpenLoginRegisterbox(jQuery); } return false; }, 1000); This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. Feedback: rightly or wrongly, the wording of your questions matters on Stack Overflow. "Please help me with the correct syntax" strikes me as an unresearched request for free work . If you want to get the best out of this platform, show what you have tried, and wh...