Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Courses
Jupyter Notebook POuL
Commits
7b1d5bd5
Verified
Commit
7b1d5bd5
authored
May 19, 2020
by
Roberto Bochet
Browse files
Reveal function is pure js now
parent
70531b0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
custom/custom.js
View file @
7b1d5bd5
/*** 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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment