Block Bilibili AppPromote

Get rid of the annoying app promote element.

  1. // ==UserScript==
  2. // @name Block Bilibili AppPromote
  3. // @namespace http://www.bilibili.com/
  4. // @version 0.2
  5. // @description Get rid of the annoying app promote element.
  6. // @author LTW
  7. // @match http://www.bilibili.com/
  8. // @grant none
  9. // ==/UserScript==
  10. //感谢知乎用户@张大川的代码分享~
  11.  
  12. var Tampermonkey_jQuery = document.createElement('script');
  13. Tampermonkey_jQuery.src = 'http://www.bilibili.com/online.js';
  14. Tampermonkey_jQuery.type = 'text/javascript';
  15. document.getElementsByTagName('head')[0].appendChild(Tampermonkey_jQuery);
  16.  
  17. function Tampermonkey_jQuery_wait()
  18. {
  19. if(typeof jQuery == 'undefined') { window.setTimeout(Tampermonkey_jQuery_wait,100); }
  20. else { $ = jQuery; runjQuery(); }
  21. console.log("waiting for jQuery prepared");
  22. }
  23. Tampermonkey_jQuery_wait();
  24.  
  25. function runjQuery()
  26. {
  27. $(document).ready(function () {
  28. // here to add your code
  29. $(".app-promote").hide();
  30. $("#ad").remove();
  31. $("#dc").remove();
  32. $("#ifd").remove();
  33. });
  34. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址