* dev: 1 * fix: tubro name * fix : floating sidebar * --wip-- [skip ci] * wip-2 * --wip-- [skip ci] * wip * fix: working wiki --------- Co-authored-by: VipinDevelops <[email protected]>
17 lines
573 B
TypeScript
17 lines
573 B
TypeScript
export function isSameURL(target: URL, current: URL) {
|
|
const cleanTarget =
|
|
target.protocol + '//' + target.host + target.pathname + target.search;
|
|
const cleanCurrent =
|
|
current.protocol + '//' + current.host + current.pathname + current.search;
|
|
|
|
return cleanTarget === cleanCurrent;
|
|
}
|
|
|
|
export function isSameURLWithoutSearch(target: URL, current: URL) {
|
|
const cleanTarget = target.protocol + '//' + target.host + target.pathname;
|
|
const cleanCurrent =
|
|
current.protocol + '//' + current.host + current.pathname;
|
|
|
|
return cleanTarget === cleanCurrent;
|
|
}
|