17 lines
346 B
JavaScript
17 lines
346 B
JavaScript
function getCurrentURL() {
|
|
return new URL(window.location.origin + window.location.pathname);
|
|
}
|
|
|
|
function getCurrentURLWithHandler(handler) {
|
|
let url = getCurrentURL();
|
|
url.searchParams.append("handler", handler);
|
|
return url;
|
|
}
|
|
|
|
export default {
|
|
getCurrentURL: getCurrentURL,
|
|
getCurrentURLWithHandler: getCurrentURLWithHandler
|
|
}
|
|
|
|
|