-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also, this copies in my private versions of htmx and min-otel, which is useful
- Loading branch information
Showing
5 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
node_modules/ | ||
*.js | ||
!*.test.js | ||
!public/*.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../hny-otel-web/dist/hny.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../bigskysoftware/htmx/src/htmx.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
console.log("JESS I SHERE"); | ||
const elementsOfInterest = document.querySelectorAll("[tron-reveal]"); | ||
console.log(elementsOfInterest); | ||
elementsOfInterest.forEach((element) => { | ||
const revealMe = element.getAttribute("tron-reveal"); | ||
console.log(`Element ${element.id} will reveal ${revealMe} on hover`); | ||
const revealElement = document.querySelector(revealMe); | ||
if (!revealElement) { | ||
console.error( | ||
`Element ${revealMe} not found, so element ${element.id} will not reveal anything` | ||
); | ||
return; | ||
} | ||
// check that revealElement is an input | ||
if (revealElement.tagName !== "INPUT") { | ||
console.error( | ||
`Element ${revealMe} is not an input, so element ${element.id} will not reveal anything` | ||
); | ||
return; | ||
} | ||
// add a hover listener to element | ||
element.addEventListener("mouseenter", () => { | ||
revealElement.type = "text"; | ||
}); | ||
element.addEventListener("mouseleave", () => { | ||
revealElement.type = "password"; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters