mirror of
https://github.com/falsycat/ar.falsy.cat.git
synced 2024-12-26 00:14:51 +00:00
fix popover regex
This commit is contained in:
parent
d46e223831
commit
54e3e071d1
@ -1,5 +1,4 @@
|
|||||||
baseURL = "https://quartz.jzhao.xyz/"
|
baseURL = "https://quartz.jzhao.xyz/"
|
||||||
#baseURL = "https://jackyzha0.github.io/quartz/"
|
|
||||||
languageCode = "en-us"
|
languageCode = "en-us"
|
||||||
googleAnalytics = "G-XYFD95KB4J"
|
googleAnalytics = "G-XYFD95KB4J"
|
||||||
pygmentsUseClasses = true
|
pygmentsUseClasses = true
|
||||||
|
@ -7,10 +7,11 @@
|
|||||||
return template.content.firstChild
|
return template.content.firstChild
|
||||||
}
|
}
|
||||||
|
|
||||||
const pathRegex = /\.\.(\/\.\.)*/
|
const pathRegex = /\.\.?(\/\.\.)*/
|
||||||
document.addEventListener("DOMContentLoaded", () => {
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
[...document.getElementsByClassName("internal-link")]
|
[...document.getElementsByClassName("internal-link")]
|
||||||
.forEach(li => {
|
.forEach(li => {
|
||||||
|
console.log(li.dataset.src.replace(pathRegex, ''))
|
||||||
const linkDest = content[li.dataset.src.replace(pathRegex, '')]
|
const linkDest = content[li.dataset.src.replace(pathRegex, '')]
|
||||||
if (linkDest) {
|
if (linkDest) {
|
||||||
const popoverElement = `<div class="popover">
|
const popoverElement = `<div class="popover">
|
||||||
|
Loading…
Reference in New Issue
Block a user