Closed xassiz closed 6 years ago
@xassiz thanks for the PR! To help me understand, when would the domain contain the window.location.pathname
? It'd need to contain /home
, /challenges
, etc which contain a /
at the start. I can imagine the problem happening if the URL contained a different base path (like /challenges
, for example) – is this what you mean?
@jpnelson nope, I meant what I said: the domain could contain the window.location.pathname
, since the whole URL (protocol as well ending with /
) is included within href attributes (every link will match then).
e.g. https://challenges.yoursite.com/challenges
Makes sense!
If the ctf URL contains any "menu word" (home, challenges, hints, scores, profile..), it will cause a wrong behaviour highlighting the menu.
e.g. "home.myctf.com" or "www.leet-challenges.net"
Using the
[attribute$=value]
JQuery selector fixes the issue.