mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2025-07-29 05:00:06 +02:00

[web] Add friction to student plans GitOrigin-RevId: 506f1e96a8430069ba5e9f7bfd6c709124e7857c
27 lines
711 B
JavaScript
27 lines
711 B
JavaScript
// window location-related functions in a separate module so they can be mocked/stubbed in tests
|
|
|
|
export const location = {
|
|
get href() {
|
|
// eslint-disable-next-line no-restricted-syntax
|
|
return window.location.href
|
|
},
|
|
assign(url) {
|
|
// eslint-disable-next-line no-restricted-syntax
|
|
window.location.assign(url)
|
|
},
|
|
replace(url) {
|
|
// eslint-disable-next-line no-restricted-syntax
|
|
window.location.replace(url)
|
|
},
|
|
reload() {
|
|
// eslint-disable-next-line no-restricted-syntax
|
|
window.location.reload()
|
|
},
|
|
setHash(hash) {
|
|
window.location.hash = hash
|
|
},
|
|
toString() {
|
|
// eslint-disable-next-line no-restricted-syntax
|
|
return window.location.toString()
|
|
},
|
|
}
|