mirror of
https://github.com/hacks-guide/Guide_3DS.git
synced 2025-08-29 19:29:51 +02:00
more strict URL check
This commit is contained in:
@@ -209,7 +209,10 @@ $(document).ready(function(){
|
|||||||
ol.children().each(function(idx, li) {
|
ol.children().each(function(idx, li) {
|
||||||
var link = $(li).find("a").attr('href');
|
var link = $(li).find("a").attr('href');
|
||||||
var name = $(li).attr('data-name');
|
var name = $(li).attr('data-name');
|
||||||
if(window.location.href.indexOf(link) > -1 && name !== "home"){
|
if((window.location.href.endsWith(link) ||
|
||||||
|
window.location.href.endsWith(link + "/") ||
|
||||||
|
window.location.href.indexOf(link + "#") > -1)
|
||||||
|
&& name !== "home"){
|
||||||
$(li).addClass("active");
|
$(li).addClass("active");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
2
assets/js/main.min.js
vendored
2
assets/js/main.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user