test: 🧪 Popstate

This commit is contained in:
ThatOneCalculator 2022-03-22 13:12:57 -07:00
parent 08352498c8
commit db834b108f
1 changed files with 3 additions and 5 deletions

View File

@ -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()
})