From 906f91f8eed5e91a7afae95c7002a3e4553d6aae Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Thu, 13 Jul 2023 07:19:35 +0000
Subject: [PATCH] base path refactor, more docs
---
quartz/components/scripts/util.ts | 13 -------------
1 files changed, 0 insertions(+), 13 deletions(-)
diff --git a/quartz/components/scripts/util.ts b/quartz/components/scripts/util.ts
index e94929b..a97faa6 100644
--- a/quartz/components/scripts/util.ts
+++ b/quartz/components/scripts/util.ts
@@ -18,19 +18,6 @@
document.addEventListener('keydown', esc)
}
-export function stripIndex(s: string): string {
- return s.endsWith("index") ? s.slice(0, -"index".length) : s
-}
-
-export function relative(from: string, to: string) {
- from = encodeURI(stripIndex(from))
- to = encodeURI(stripIndex(to))
- const start = [location.protocol, '//', location.host, location.pathname].join('')
- const trimEnd = from.length === 0 ? start.length : -from.length
- const url = start.slice(0, trimEnd) + to
- return url
-}
-
export function removeAllChildren(node: HTMLElement) {
while (node.firstChild) {
node.removeChild(node.firstChild)
--
Gitblit v1.10.0