auto adjust youtube video speed

set youtube video speed to 1.5x(you can set your own speed) automatically.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name auto adjust youtube video speed
// @namespace Violentmonkey Scripts
// @description set youtube video speed to 1.5x(you can set your own speed) automatically.
// @match *://*.youtube.com/*
// @match *://*.bilibili.com/video/*
// @require  http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @require  https://greasyfork.org/scripts/383527-wait-for-key-elements/code/Wait_for_key_elements.js?version=701631
// @grant    GM_addStyle
// @version 0.0.3
// ==/UserScript==

waitForKeyElements ("video", function() {
  'use strict';
  // set your desired play speed here
  var rate = 1.7;
  document.querySelector('video').onplay=function() {
    document.querySelector('video').playbackRate = rate;
  }
  document.querySelector('video').playbackRate = rate;
});