BiliPlus

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

目前為 2018-01-23 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

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

// @include      http*://www.bilibili.com/*
// @include      http*://bangumi.bilibili.com/anime/*
// @include      http*://space.bilibili.com/*
// @include      http*://www.bilibili.com/bangumi/play/*

// @run_at       document_start
// @require      https://code.jquery.com/jquery-latest.js
// @grant        none
// ==/UserScript==
$(function(){
    var css = "";
    //添加订阅链接
    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();
    });
    $("<style></style>").text(css).appendTo($("head"));
});

//视频跳转
$(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'));
});