Skip to content

Instantly share code, notes, and snippets.

@headquarters
Last active May 1, 2020 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save headquarters/48b7a7fed1a3baf5499d8d107c4dd394 to your computer and use it in GitHub Desktop.
Save headquarters/48b7a7fed1a3baf5499d8d107c4dd394 to your computer and use it in GitHub Desktop.
Scroll to next Linux Academy video
javascript:(function()%7Bvar%20list%20%3D%20document.querySelectorAll(%22.fa-fw.complete%22)%3Blist%5Blist.length-1%5D.scrollIntoView(%7Bbehavior%3A%20%22smooth%22%20%7D)%7D)()
@headquarters
Copy link
Author

headquarters commented Apr 29, 2020

Linux Academy course lists can get really long and the UI doesn't provide a convenient way to pick back up where you left off when you log back in. This bookmarklet is useful to get you right to the next video in your list, without having to scroll thousands of pixels down screen and visually search for the next item to watch.

animated gif of scrolling on linuxacademy.com

@headquarters
Copy link
Author

Pre-minified script:

var list = document.querySelectorAll(".fa-fw.complete");
list[list.length-1].scrollIntoView({behavior: "smooth" });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment