BiliPlus

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

Από την 30/01/2018. Δείτε την τελευταία έκδοση.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==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)');
    }
});