Find file
Fetching contributors…
Cannot retrieve contributors at this time
527 lines (386 sloc) 18.7 KB


88 - October 25, 2016

  • Add support for the Material Design UI experiment.

87 - September 3, 2016

  • Rewrite the previous fix since it caused problems.

86 - September 3, 2016

  • Fix empty space when closing the share widget.

85 - July 14, 2016

  • Fix seekbar fix regex.

84 - July 7, 2016

  • Don't run script in video iframes, or iframes on Now compatible with "Simple YouTube MP3 Button".
  • Fix videos on channel pages when first visiting a video url.

83 - Mar 27, 2016

  • Force width to 100% on the #player-api element to fix compatibility with Youtube+.

82 - Mar 1, 2016

  • Prevent script from running on channel pages.

81 - Feb 20, 2016

  • Proper fix for the player ui not resizing before being clicked.

80 - Feb 20, 2016

  • Tempfix the player ui not resizing before being clicked.

79 - Feb 16, 2016

  • Tempfix the player ui not resizing before being clicked.
  • Stop duplicating the stylesheet every page.
  • Target body[data-spf-name="watch"] if spf is enabled so the player remains the same size when changing video.

78 - Jan 18, 2016

  • Fix a few errors.

77 - Dec 24, 2015

  • Fix the autoplay UI not being shown.

76 - Dec 24, 2015

  • Cleanup cached varibles when changing pages. Should fix the seekbar width breaking after a few videos.
  • Make compatible with Youtube+'s "Player always visible when reading comments" feature.

75 - Dec 19, 2015

  • Trigger resizing the player controls after patching it's size function.

74 - Dec 17, 2015

  • Fix the Skip Ad UI getting hidden.

73 - Dec 13, 2015

  • Reenable the html5 seekbar fix since apparently the problem is unrelated to my script.

72 - Dec 12, 2015

  • Disable the html5 seekbar fix (for now). My technique appears to break everything (comment loading/autoplay/buttons) on occasion.
  • Fix playlist widget overlaying sidebar.

71 - Nov 24, 2015

  • Fix html5 seekbar.

70 - Aug 19, 2015

  • Fix playlist overlaying the rest of the sidebar.
  • Fix playlist overlaying the video description when using Youtube+.

69 - July 26, 2015

  • Make script slightly compatible with Youtube+ after clicking another video.

68 - June 19, 2015

  • Update HTML5 fix for the old player. Objects.keys(obj.constructor.prototype) was skipping the property, so used for (var k in obj){}.

67 - June 17, 2015

  • Make script slightly compatible with Youtube+

66 - June 14, 2015

  • Fix player offset when the window is really small.

65 - May 28, 2015

  • Update HTML5 fix for old player.

64 - May 7, 2015

  • Fix removing transition on the masthead. YT Center has another rule with !important.
  • Fix the playlist widget getting hidden beneath the player.

63 - May 6, 2015

  • Update HTML5 fix.
  • Remove transition on the masthead.

62 - May 6, 2015

  • Fix the height on new .html5-video-container element.

61 - Apr 30, 2015

  • Update HTML5 fix.

60 - Apr 29, 2015

  • Prevent offset on .player-api when in theater mode.

59 - Apr 29, 2015

  • Update HTML5 fix regexes.

58 - Apr 29, 2015

  • Hide the #placeholder-player element.

57 - Mar 16, 2015

  • Update HTML5 fix regexes.

56 - Mar 2, 2015

  • Update HTML5 fix regexes.

55 - Feb 24, 2015

  • Update HTML5 fix regexes.

54 - Feb 23, 2015

  • Fix double audio bug after clicking a video on the homepage/search page.
  • No longer reloading the html5 player to get the playerInstance. We are instead creating an unused dummy playerInstance to get the reference to it's constructor, which has a static list of the list of active playerInstances.
  • Reattempt to subscribe to pubsub events 1 second later if we get an error.

53 - Feb 12, 2015

  • Fix double audio due to not doing a null check.
  • Hide Skip navigation text that overlays the video.

52 - Jan 28, 2015

  • Search with regex for function that need replacing in HTML5 player.

1.51 - Jan 27, 2015

  • Update HTML5 fix variables and check in case things have changed.

1.50 - Jan 24, 2015

  • New HTML5 player fix method which should fix any weird video => video navigation bugs.

1.49 - Jan 9, 2015

  • Update to the new "detailpage" variable for the HTML5 fix.

1.48 - Dec 20, 2014

  • Update to the new "detailpage" variable for the HTML5 fix.

1.47 - Dec 11, 2014

  • Fix bug when visiting a non /watch page first before navigation to the watch video page.
  • Update to the new "detailpage" variable for the HTML5 fix.

1.46 - Nov 15, 2014

  • Remote undoing the HTML5 player fix before navigating to a new video as it isn't needed.

1.45 - Nov 12, 2014

  • Re fix the progress bar scaling issue.
  • Undo the HTML5 player fix before navigating to a new video in order to also load the video description / comments.

1.44 - Oct 31, 2014

  • Fix a second video player getting loaded when running this script along Youtube Center, this reintroduces the progressbar bug for users with YT Center. Please use the dev build of YT Center until the author pushes the fix to the main build.

1.43 - Oct 30, 2014

  • Fix HTML5 progress bar not resizing. Thanks to YePpHa for re-solving this bug in YoutubeCenter Issue #1083.
  • Completely hide the Player controls on the HTML5 player since we're reloading the player anyways.

1.42 - Aug 18, 2014

  • Fix HTML5 progress bar not resizing. Thanks to YePpHa for solving this bug in YoutubeCenter. [Screenshot]
  • Fix the player getting right aligned in some cases. [Screenshot]
  • Prevent the script from running twice on the same page.

1.41 - Aug 11, 2014

  • Remove poorly done HTML5 fix. The HTML5 progress bar will remain unfixed until a Youtube update provides the ability to resize it.
  • Use CSS absolutly positioning to move the player. This should fix playback restarting while moving the player.

1.40 - July 23, 2014

  • Attempt to fix the html5 player. The seek bar & annotations might not scale properly.

1.39 - July 12, 2014

  • Remove debugging code that broke the script due to a raise in javascript execution security.

1.38 - June 17, 2014

  • Style #watch7-sidebar {top: 0 !important; } to fix the sidebar overlapping the player.
  • Fix the guide from being off position when viewing the video.

1.37 - May 13, 2014

  • Style the new #player-mole-container element. It had a height of 0, which was hiding the player.

1.36 - March 22, 2014

  • [Link] BugFix: On the HTML5 player, resizing it to a non standard width will cause the cursor in the seek bar to not line up. In order to fix this, the script now removes the .watch-small, .watch-medium or .watch-large from the #player element.

1.35 - Febuary 12, 2014

  • Hook into the appbar-guide-delay-load event. It should be called on every single page however, unlike the other events...
  • Fix another regression from rewriting the script: check if the script is on a /watch? page before runnning.

1.34 - Febuary 7, 2014

  • Re add code to move the playlist as not all users might have updated to the new UI.

1.33 - Febuary 7, 2014

  • Check the previous player state before moving to decide to autoplay or not.

1.32 - Febuary 7, 2014

  • Fix issue where video would bug when playing videoes in a row.
  • Refactored script.
  • Autoplay videos as moving the player pauses the video.

1.31 - October 28, 2013

  • Automatically uncheck relevant YT Center settings for the user. This is done during the player-added event simply because it (should) be after YT Center is up and running.

1.30 - October 28, 2013

  • Create a placeholder to mark where the player was, so we can move it back there during a SPF navigation.
  • Hook into the init-watch and dispose-watch events rather than the ones used before (player-added and navigate).

1.29 - October 26, 2013

  • Minor CSS update to fix padding below the playlist tray caused by todays update.

1.28 - October 23, 2013

  • [Thread] Update the fixed header so it doesn't overlay the video.

1.27 - September 8, 2013

  • Go back to moving the #player element rather than #player-api as the playlist bar is no longer attached above it.

1.26 - August 20, 2013

  • Remove references to -legacy.
  • Check the window.location.href for /watch? to run the script. The old way no longer works (checking for #player-api) as it's now pregenerated even on the homepage.
  • Add debugging ouput to the console.
  • Move the Video Manager bar into #watch7-content so that it fits in seemlessly [Screenshot].

1.25 - August 15, 2013

  • The script now moves the playlist bar and tray. The playlist tray is moved into the sidebar element.
  • General cleanup of unused styling.
  • Don't remove the script selector from the body element during AJAX navigation as it looks weird if you notice the removal of this scripts styling. Youtube will removes it later (at a proper time) anyways.
  • Only hide the horizontal scrollbar when fully scrolled to the top.

1.24 - August 15, 2013

  • [Thread] Update for today's Youtube update. #player-api#player-api-legacy.

1.23 - August 11, 2013

  • [Thread] Bug Fix for users using Youtube Center. Had to override the height on the #player element.

1.22 - August 10, 2013

  • [Thread] Bug Fix for users using Firefox. The #player-api element had a float: left; on it. The UI in general doesn't seem to have had the update Chrome does (no fixed header + guide).

1.21 - August 1, 2013

  • [Thread] Wrap an exception caused by the not yet existing when the script gets run in NinjaKit on Safari. Will possibly cause this bug to resurface when using safari.

1.20 - July 30, 2013

  • Fix bug in Firefox/Greasemonkey where the script would break trying to get the object reference by changing all references to window to unsafeWindow.

1.19 - July 30, 2013

  • Run the script slightly earlier at the player-added event.
  • The horizontal scrollbar is now hidden until the video is no longer visible.
  • Fix bug where the playlist tray was overlapping the video.
  • Fix bug where the script was run twice on page load.

1.18 - July 28, 2013

  • I managed to find a proper place to hook into Youtube's new AJAX technique. Wrapping window.history.pushState didn't seem to work. On a further look, it also seems like I should have tried wrapping replaceState as well. Instead of wrapping ytspf.config like Youtube Center, I've found yt.pubsub.instance_.subscribe(eventName, callback). The bugs listed in 1.17 are fixed.
    • Listen to the navigate event which is triggered before the page loads through AJAX in order to perform a cleanup (delete the video player as it's out of position).
    • Listen to the player-ready event in order to move the player.

1.17 - July 26, 2013

Youtube's latest update now loads new pages through ajax (and also when you click a Youtube link in Google).
  • Temporarily move the main selector used to identify the script body.ytwp-window-player to html.ytwp-window-player body. Navigating to a new page through ajax will clear all classes attached to the body element.
Until I've managed to hook into Youtube's new SPF/Ajax technique, the following bugs will be prevalent.
  • Visiting the homepage, then clicking a video won't cause the script to run.
  • Visiting the homepage (or any other url) will still show the last video above the page.

1.16 - July 24, 2013

  • Use unsafeWindow.addEventListener(...) instead of window.onresize = function(){...}. window.addEventListener was broken in the recent version of Tampermonkey, but should work now.

1.15 - July 19, 2013

  • Use absolute positioning on the guide until the user has scrolled past the video completely.
  • Do checks for if the video is in view (for switching to the fixed header) when the window is resized.

1.14 - July 16, 2013

  • Minor refactor on the last update and removed a debugging console.log().

1.13 - July 16, 2013

  • Use absolute positioning on the fixed header until the user has scrolled past the video completely. It will add the class ytwp-viewing-video to the body element when doing so.

1.12 - July 15, 2013

  • Remove some whitespace from some large areas of whitespace caused by branded pages (Example).
  • Resize the playlist tray to the same width as the sidebar.
  • Inject the completed stylesheet instead of updating as the script runs.

1.11 - May 7, 2013

  • Fix edge case missed in the last version. There was another rule that affected the padding-left when the guide was collapsed and under the small page width media query.

1.10 - May 7, 2013

  • Fix padding on the playlist bar when using 'Center Page' in YT Center.

1.9 - May 3, 2013

  • Removed padding and margin-top override on #player.
  • Adjusted selectors for the sidebar due to the shifting of element/classes.

1.8 - Apr 2, 2013

  • Change all occurance of #playlist-main-container to #playlist.
  • Use !important when settings margin-top on the sidebar due to it being set at element level (only on non-playlist pages).
  • Fix styling margins on the sidebar on pages with the playlist bar.

1.7 - Mar 20, 2013

  • Updated for Youtube's new layout. #watch7-video-container became #player, #watch7-video became #player-api.
  • The fixed Feedback button code was removed (no longer there).
  • Raised the z-index of the #watch7-creator-bar due to the #guide overlaying it and making the buttons unclickable. This is most likely a side effect of the last patch because the #watch7-creator-bar was a child of #watch7-video-container and therafor was no longer moved with the video (speculation). The creator bar currently looks like so.

1.6 - Feb 28, 2013

  • Script is now only run on the /watch page.
  • Removed whitespace margin leftover from moving the video.
  • The script now moves the #watch7-video instead of the #watch7-video-container element due to Youtube's new update which will move the #watch7-playlist-container element above the #watch7-video-container element. An example of this new bug can be seen here.
  • Fixed typo in local variable name.

1.5 - Feb 5, 2013

  • Refactored code to inject overriding CSS instead of applying styling to the elements themselves.
  • Deleted the Feedback element altogether.
  • Fixed compatibility with YT Center. (Forum Post)
  • Fixed styling of the Video Manager bar when browsing your own videos. (Forum Post) (Example)
  • Added css class to the body tag so people can style around this effects of this script. Use body.ytwp-window-player with your selector(s).
  • Overwrote the smooth resizing of the video player.

1.4 - Jan 6, 2013

  • Fixed the video getting resized when opening the guide (Example).
  • Moved the fixed Feedback element to the bottom of the page (Example).

1.3 - Dec 27, 2012

  • Fix styling on pages with a playlist bar by:
    • Moving down the related videos with the small video player
    • Fixing the width of the playlist bar and un-hiding the toggle playlist button in large video mode.
  • Update script metadata.


  • Fixed styling to work in small video mode.
  • Fixed styling to work in FireFox. Examples: [1] | [2]. Note that the feedback button was moved in later versions.