mirror of
https://github.com/Juicysteak117/pghrt.git
synced 2025-12-21 15:35:25 +00:00
First Commit (finally lol)
This commit is contained in:
19
export/pghrtjs.js
Normal file
19
export/pghrtjs.js
Normal file
@@ -0,0 +1,19 @@
|
||||
var coll = document.querySelectorAll(".ltx_tocentry.ltx_tocentry_section > .ltx_ref");
|
||||
var i;
|
||||
|
||||
for (i = 0; i < coll.length; i++) {
|
||||
coll[i].addEventListener("click", function() {
|
||||
this.classList.toggle("active");
|
||||
var content = this.nextElementSibling;
|
||||
if (content) {
|
||||
if (content.style.maxHeight){
|
||||
content.style.maxHeight = null;
|
||||
} else {
|
||||
content.style.maxHeight = content.scrollHeight + "px";
|
||||
}
|
||||
} else {}
|
||||
});
|
||||
if (coll[i].nextElementSibling) {} else {
|
||||
coll[i].classList.add("del");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user