Bilibili Tune

Bilibili Tune: longer and wider video list, ...

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==
// @namespace ATGT
// @name     Bilibili Tune
// @description Bilibili Tune: longer and wider video list, ...
// @version  2
// @license  MIT
// @match    https://www.bilibili.com/video/*
// @icon     https://www.bilibili.com/favicon.ico
// @grant    none
// @run-at   document-end
// ==/UserScript==
  
//alert("hello");
console.log("++++++ bilibili-tune");

function sleep(ms) {
    return new Promise(resolve => setTimeout(resolve, ms));
}


let tuneFunc = async function () {
  const start = Date.now();
  const height = "600px";
  console.log("bilibili-tuneFunc start", start/1000);
  
  while (Date.now() - start < 5000) {
    let vlist = document.querySelector(".base-video-sections-v1 .video-sections-content-list");
//     console.log("bilibili-tune vlist", vlist);

    if (vlist) {
      vlist.style.maxHeight = height;
      vlist.style.height = height;
      
      let videos = document.querySelectorAll(".base-video-sections-v1 .video-section-list .video-episode-card__info-title");
// 			console.log("bilibili-tune videos", videos);
      for (let v of videos) {
        v.style.width = "auto";
      }
    }
    
    await sleep(500);
  }
  
  console.log("bilibili-tuneFunc end", start/1000);
}

tuneFunc();
window.addEventListener('popstate', tuneFunc);
window.addEventListener('pushstate', tuneFunc);

console.log("------ bilibili-tune");