code refactoring
This commit is contained in:
parent
c1d50da655
commit
d133b18651
14
index.html
14
index.html
@ -1984,17 +1984,9 @@
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (targetPage.includes('/')) {
|
if (targetPage.includes('/')) {
|
||||||
if (targetPage.includes('?')) {
|
let path;
|
||||||
const splitAddress = targetPage.split('?')
|
[path, searchParams] = targetPage.split('?');
|
||||||
searchParams = splitAddress.pop()
|
[, pageId] = path.split('/')
|
||||||
const pages = splitAddress.pop().split('/')
|
|
||||||
pageId = pages[1]
|
|
||||||
subPageId = pages[2]
|
|
||||||
} else {
|
|
||||||
const pages = targetPage.split('/')
|
|
||||||
pageId = pages[1]
|
|
||||||
subPageId = pages[2]
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
pageId = targetPage
|
pageId = targetPage
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user