From 3ac6b42e16dca5a44ed3fec2c0314f1dbbc2322b Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Sun, 16 Jul 2023 06:02:12 +0000
Subject: [PATCH] finish path refactoring, add sourcemap + better trace support

---
 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