Block Bilibili AppPromote

Get rid of the annoying app promote element.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Block Bilibili AppPromote
// @namespace    http://www.bilibili.com/
// @version      0.2
// @description  Get rid of the annoying app promote element.
// @author       LTW
// @match        http://www.bilibili.com/
// @grant        none
// ==/UserScript==
//感谢知乎用户@张大川的代码分享~

var Tampermonkey_jQuery = document.createElement('script');
Tampermonkey_jQuery.src = 'http://www.bilibili.com/online.js';
Tampermonkey_jQuery.type = 'text/javascript';
document.getElementsByTagName('head')[0].appendChild(Tampermonkey_jQuery);

function Tampermonkey_jQuery_wait()
{
    if(typeof jQuery == 'undefined') { window.setTimeout(Tampermonkey_jQuery_wait,100); }
    else { $ = jQuery; runjQuery(); }
    console.log("waiting for jQuery prepared");
}
Tampermonkey_jQuery_wait();

function runjQuery()
{
    $(document).ready(function () {
        // here to add your code
        $(".app-promote").hide();
        $("#ad").remove();
        $("#dc").remove();
        $("#ifd").remove();
    });
}