Skip to content

Commit

Permalink
scroll to the very top of the page if it has a video playing
Browse files Browse the repository at this point in the history
  • Loading branch information
glaucocustodio committed Nov 30, 2019
1 parent 7632a7f commit f7e5409
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion HOW-TO-RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# How to release

- change the version on `manifest.json`
- create a git tag (ex: v0.0.9)
- create a git tag (ex: `git tag v0.0.9`) and push it `git push --tags`
- go to Releases page of the repo
- click "Draft a new release"
- choose the tag
Expand Down
1 change: 1 addition & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ var setFocus = function(){
var videoActive = video && video.src != "";
if(videoActive){
SpatialNavigation.focus('ytd-player');
window.scrollTo(0, 0);

// hack for Firefox
if(document.activeElement.tagName == 'BODY') {
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "YouCaptain",
"version": "0.0.5",
"version": "0.0.6",
"description": "Enables keyboard navigation on YouTube",
"manifest_version": 2,
"homepage_url": "https://github.com/glaucocustodio/youcaptain",
Expand Down

0 comments on commit f7e5409

Please sign in to comment.