Created
May 30, 2023 01:20
-
-
Save gslin/1b86866f76c127219b9060101428c6c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _enable( $container, prefix, page, isClosed ) { | |
... | |
// Restricted to links created by editors and thus outside our control | |
// T166544 - don't do this for reference links - they will be handled elsewhere | |
var $link = $container.find("a:not(.reference a)"); | |
$link.on("click", function () { | |
// the link might be an internal link with a hash. | |
// if it is check if we need to reveal any sections. | |
if ( | |
$link.attr("href") !== undefined && | |
$link.attr("href").indexOf("#") > -1 | |
) { | |
checkHash(); | |
} | |
}); | |
util.getWindow().on("hashchange", function () { | |
checkHash(); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment