Reveal function is pure js now

parent 70531b0d
/*** Autoscroll ***/
autoscroll = () => {
let autoscroll = () => {
container = document.querySelector("#site");
cell = document.querySelector(".cell.selected");
......@@ -16,6 +16,20 @@ $([IPython.events]).on("output_appended.OutputArea", function () {
});
/*** Auto reveal ***/
$([IPython.events]).on("select.Cell", () => {
document.querySelector(".cell.selected").classList.add("shown");
});
\ No newline at end of file
(() => {
let style = document.createElement('style');
document.head.appendChild(style);
style.type = 'text/css';
style.innerText = ".unselected { visibility: hidden;}";
document.querySelectorAll(".cell:not(:first-of-type)").forEach(e => {
e.classList.add("unselected");
});
$([IPython.events]).on("select.Cell", () => {
document.querySelector(".cell.selected").classList.remove("unselected");
});
})();
\ 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