Prevent changeset comment links from reloading the page
This commit is contained in:
parent
a9752be6b3
commit
cf80eb50f3
1 changed files with 5 additions and 0 deletions
|
@ -380,6 +380,11 @@ $(function () {
|
|||
return;
|
||||
}
|
||||
|
||||
// Open local anchor links as normal.
|
||||
if ($(this).attr("href")?.startsWith("#")) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Ignore cross-protocol and cross-origin links.
|
||||
if (location.protocol !== this.protocol || location.host !== this.host) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue