mirror of
https://github.com/paradoxxxzero/butterfly.git
synced 2025-01-03 08:58:32 +00:00
11 lines
400 B
CoffeeScript
11 lines
400 B
CoffeeScript
Terminal.on 'change', (line) ->
|
|
if 'extended' in line.classList
|
|
line.addEventListener 'click', do (line) -> ->
|
|
if 'expanded' in line.classList
|
|
line.classList.remove 'expanded'
|
|
else
|
|
before = line.getBoundingClientRect().height
|
|
line.classList.add 'expanded'
|
|
after = line.getBoundingClientRect().height
|
|
document.body.scrollTop += after - before
|