mirror of https://github.com/zer0bin-dev/zer0bin
test: 🧪 Popstate
This commit is contained in:
parent
08352498c8
commit
db834b108f
|
@ -75,7 +75,7 @@ tippy("#github-button", {
|
|||
allowHTML: true,
|
||||
})
|
||||
|
||||
function updateTooltips() {
|
||||
window.addEventListener("popstate", () => {
|
||||
let theme = ""
|
||||
|
||||
if (window.location.pathname == "/") {
|
||||
|
@ -87,11 +87,9 @@ function updateTooltips() {
|
|||
console.log(theme)
|
||||
|
||||
for (const i in document.querySelectorAll(".btn")) {
|
||||
//@ts-ignore
|
||||
console.log(i._tippy)
|
||||
//@ts-ignore
|
||||
i._tippy.setProps({ theme: theme })
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener("popstate", () => {
|
||||
updateTooltips()
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue