Greasy Fork is available in English.

b站按下alt二倍速

按下alt键实现二倍速,松开恢复一倍速

// ==UserScript==
// @name         b站按下alt二倍速
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  按下alt键实现二倍速,松开恢复一倍速
// @author       iehtian
// @match        *://*.bilibili.com/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    // Your code here...
document.addEventListener("keydown", function(event) {
    if (event.keyCode === 18) {
        document.querySelector('video').playbackRate = 2
    }
})
document.onkeyup = function(e) {
    var keyNum = window.event ? e.keyCode : e.which;
    if (keyNum == 18) {
        document.querySelector('video').playbackRate = 1
    }
}

})();