Greasy Fork is available in English.

风车动漫滚动到当前集数

播放列表滚动到当前集数

// ==UserScript==
// @name         风车动漫滚动到当前集数
// @namespace    gqqnbig
// @version      0.1
// @description  播放列表滚动到当前集数
// @author       gqqnbig
// @match        http://www.doubao.cc/v/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Your code here...
    let path=location.pathname;
    let p=path.lastIndexOf('/');
    if(p==-1)
        return;

    path=path.substr(p+1);
    let targetElement= $(".movurls li>a[href$='"+path+"']");
    let container=targetElement.closest('ul');
    if(targetElement.length>0 && container.length>0)
    {
        container[0].scrollTo(0,targetElement[0].offsetTop-container[0].offsetTop);
    }
})();