-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathruby-code-frame.js
More file actions
23 lines (22 loc) · 803 Bytes
/
ruby-code-frame.js
File metadata and controls
23 lines (22 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
"use strict";
(function() {
var replContainer = document.getElementById("repl");
replContainer.addEventListener("click", function() {
if(replContainer.classList &&
typeof replContainer.classList.add === "function") {
replContainer.classList.remove("repl-container-hide");
replContainer.classList.add("repl-container-show");
} else {
replContainer.className = "repl-container-show";
}
});
replContainer.addEventListener("mouseleave", function() {
if(replContainer.classList &&
typeof replContainer.classList.remove === "function") {
replContainer.classList.remove("repl-container-show");
replContainer.classList.add("repl-container-hide");
} else {
replContainer.className = "repl-container-hide";
}
});
})();