diff --git a/index.html b/index.html
index 2a3e0e0..cf3c7f7 100644
--- a/index.html
+++ b/index.html
@@ -1005,19 +1005,9 @@
}
else {
if (targetPage.includes('/')) {
- if (targetPage.includes('?')) {
- const splitAddress = targetPage.split('?')
- searchParams = splitAddress.pop()
- const pages = splitAddress.pop().split('/')
- pageId = pages[1]
- subPageId1 = pages[2]
- subPageId2 = pages[3]
- } else {
- const pages = targetPage.split('/')
- pageId = pages[1]
- subPageId1 = pages[2]
- subPageId2 = pages[3]
- }
+ let path;
+ [path, searchParams] = targetPage.split('?');
+ [, pageId] = path.split('/')
} else {
pageId = targetPage
}