igrigorik/videospeed — pull request #4 by arielallon (2014-04-30 13:01:37+00:00)
Title: SpeedIndicator value reset when navigating to related videos on YouTube

Issue
------
When navigating to other videos on youtube, videos are changed via AJAX. Even though the speed of the video is reset*, the speedIndicator does not reflect this.

Solution
----------
YouTube does not create a new DOM node or refresh the page, instead just changes the video source.
Therefore, added a MutationObserver on the video src to reset the speedIndicator text.
This will work on video tags anywhere that follow this pattern.

(I don't work in JS too much, so if I did anything sub-optimally, lemme know.)

*I think this is the correct behavior, though an enhancement might be to add a "sticky speed" configuration to maintain the same modified speed across all future videos until further notice. Not sure how useful that would be.