BiliPlus

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

当前为 2018-01-30 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

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