BiliBili 1.5X PlayBack

设置B站默认播放速度为1.5倍

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         BiliBili 1.5X PlayBack
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  设置B站默认播放速度为1.5倍
// @author       Aqua
// @include      *://www.bilibili.com/video/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    document.querySelector("video:first-child").playbackRate = 1.5;
    var timer = setInterval(function() {
        if(sessionStorage.getItem("bilibili_player_settings") === null) {
            document.querySelector("video:first-child").playbackRate = 1.5;
        } else {
            document.querySelector("video:first-child").playbackRate = 1.5;
            var playSettingObj = JSON.parse(sessionStorage.getItem("bilibili_player_settings"));
            playSettingObj['video_status']['videospeed'] = 1.5;
            sessionStorage.setItem('bilibili_player_settings', JSON.stringify(playSettingObj));
            console.log('abc');
            clearInterval(timer);
        }
    }, 200);
    // Your code here...
})();