Skip to content

Commit

Permalink
Stop the link from being followed
Browse files Browse the repository at this point in the history
Refs #2044
  • Loading branch information
thewilkybarkid committed Oct 25, 2024
1 parent bb9ba70 commit e1d97b9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions assets/locale-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ export class LocalePicker extends HTMLElement {
const locale = event.target.dataset['locale']
if (locale !== undefined) {
document.cookie = `locale=${locale};path=/;samesite=lax`
window.scrollTo({ top: 0 })
location.reload()

event.preventDefault()
}
})
}
Expand Down

0 comments on commit e1d97b9

Please sign in to comment.