Commit b5ec28b7 authored by Zhai Zirun's avatar Zhai Zirun

cleaned up button.js

parent 0a89fbe3
......@@ -2,29 +2,17 @@ document.getElementById("custom-button").addEventListener("click", openCustomTab
document.getElementById("load-button").addEventListener("click", openLoadTab);
function openCustomTab() {
var i, tablinks;
document.getElementById("load").className = "content";
document.getElementById("load-button").className = "tablinks";
// tablinks = document.getElementsByClassName("tablinks-active");
// for (i = 0; i < tablinks.length; i++) {
// tablinks[i].className = tablinks[i].className.replace("-active", "");
// }
document.getElementById("custom").className = "content-active";
document.getElementById("custom-button").className += "-active";
}
function openLoadTab() {
var i, tablinks;
document.getElementById("custom").className = "content";
document.getElementById("custom-button").className = "tablinks";
document.getElementById("load").className = "content-active";
document.getElementById("load-button").className += "-active";
}
document.getElementById("custom-button").click();
\ No newline at end of file
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment