BiliPlus

哔哩哔哩错误视频自动跳转

Stan na 30-01-2018. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         BiliPlus
// @namespace    https://www.biliplus.com/
// @version      1.09
// @description  哔哩哔哩错误视频自动跳转
// @author       SettingDust

// @include      http*://*.bilibili.com/*

// @require      https://code.jquery.com/jquery-latest.js

// @run_at       document_start
// ==/UserScript==
//视频跳转
$(window).load(function() {

    if ($('.error-container').length > 0)
        location.replace(location.href.replace(/\:\/\/www\.bilibili\.com\/video/, '://www.biliplus.com/video'));
    if ($('.video-list-status-text').length > 0)
        location.replace(location.href.replace(/\:\/\/bangumi\.bilibili\.com\/anime/, '://www.biliplus.com/bangumi/i'));
    if ($('.player-limit-wrap').length > 0)
        location.replace(location.href.replace(/\:\/\/www\.bilibili\.com/, '://www.biliplus.com'));

    //添加订阅链接
    var fav=$('ul.fr li:eq(5)').prop("outerHTML");
    fav=fav.replace('favlist','bangumi');
    fav=fav.replace('收藏夹','订阅');
    $('ul.fr').append(fav);
    //收藏夹跳转
    $('body').mouseover(function(){
        $('.small-item.disabled').each(function(){
            $(this).removeClass('disabled');
            $(this).find('a').attr('href','https://www.biliplus.com/video/av' + $(this).attr('data-aid'));
        });
        $('.disabled-cover').remove();
    });
    //直播间历史聊天可到最顶部
    if($('#rank-list-vm').length>0){
        $('#rank-list-vm').css('height','152px');
        $('.chat-history-panel').css('height','calc(100% - 128px - 152px)');
    }
});