-
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.
- Loading branch information
Showing
23 changed files
with
13,416 additions
and
494 deletions.
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
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
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,37 @@ | ||
window.addEventListener("load", function () { | ||
|
||
// Assume Maya if no choice has yet been made | ||
if (window.localStorage.getItem("RagdollHost1") == null) { | ||
window.localStorage.setItem("RagdollHost1", "maya"); | ||
} | ||
|
||
setTab(null, window.localStorage.getItem("RagdollHost1")); | ||
|
||
}, false ); | ||
|
||
/* Utility function */ | ||
function hasClass(element, cls) { | ||
return (' ' + element.className + ' ').indexOf(' ' + cls + ' ') > -1; | ||
} | ||
|
||
/* Called when the user clicks any tabbed element */ | ||
function setTab(event, tabName) { | ||
|
||
// Remember choice until next page visit | ||
window.localStorage.setItem("RagdollHost1", tabName); | ||
|
||
var i, tabcontent, tabs; | ||
|
||
// Get all elements with class="tab-content" and hide them | ||
tabcontent = document.getElementsByClassName("tab-content"); | ||
for (i = 0; i < tabcontent.length; i++) { | ||
tabcontent[i].style.display = hasClass(tabcontent[i], tabName) ? "block" : "none"; | ||
} | ||
|
||
// Get all elements with class="tab" and remove the class "active" | ||
tabs = document.getElementsByClassName("tab"); | ||
for (i = 0; i < tabs.length; i++) { | ||
tabs[i].className = tabs[i].className.replace(" active", ""); | ||
tabs[i].className += hasClass(tabs[i], tabName) ? " active" : "" | ||
} | ||
} |
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
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
Oops, something went wrong.