BDDynamic

fuck baidu

  1. // ==UserScript==
  2. // @name BDDynamic
  3. // @namespace bddynamic
  4. // @description fuck baidu
  5. // @match http://tieba.baidu.com/*
  6. // @match https://tieba.baidu.com/*
  7. // @version 1
  8. // @grant unsafeWindow
  9. // ==/UserScript==
  10.  
  11. window.onload = weak;
  12.  
  13. function stopVideo(){
  14. if(document.getElementById('video_frs_head')!==null){
  15. document.getElementById('video_frs_head').remove();
  16. }
  17. var vList=document.getElementsByClassName('threadlist_video');
  18. var j=vList.length;
  19. for(var i=0;i<j;++i){
  20. var link = vList[i].children[1].getAttribute('data-video');
  21. vList[i].children[1].setAttribute('data-video','');
  22. }
  23. }
  24.  
  25. function weak(){
  26. stopVideo();
  27. var loc = parseInt(unsafeWindow.PageData.forum.id);
  28. var list = document.getElementById('thread_list').children;
  29. var j = list.length;
  30. for (var i = 0; i < j; ++i) {
  31. if (list[i].className == 'thread_top_list_folder') {
  32. //do nothing
  33. }
  34. else if (list[i].className != ' j_thread_list clearfix') {
  35. //hide advertisements
  36. list[i].remove();
  37. i--;
  38. j--;
  39. }
  40. else if (list[i].getElementsByClassName('threadlist_btn_play j_m_flash').length > 0) {
  41. if (list[i].getElementsByClassName('threadlist_btn_play j_m_flash') [0].getAttribute('data-forumid') != loc) {
  42. list[i].remove();
  43. i--;
  44. j--;
  45. }
  46. }
  47. else if (list[i].getElementsByClassName('thumbnail vpic_wrap').length > 0){
  48. if(list[i].getElementsByClassName('thumbnail vpic_wrap')[0].children[0].getAttribute('bpic').match('forum/pic/item/723d269759ee3d6d81a184654b166d224f4ade3d')){
  49. list[i].remove();
  50. i--;
  51. j--;
  52. }
  53. }
  54. }
  55. }
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62. function strong() {
  63.  
  64. stopVideo();
  65.  
  66. var list = document.getElementById('thread_list').children;
  67. var j = list.length;
  68. for (var i = 0; i < j; ++i) {
  69. if (list[i].className == 'thread_top_list_folder') {
  70. //do nothing
  71. }
  72. else if (list[i].className != ' j_thread_list clearfix') {
  73. //hide advtisements
  74. list[i].remove();
  75. i--;
  76. j--;
  77. }
  78. else if (list[i].getElementsByClassName('threadlist_btn_play j_m_flash').length > 0) {
  79. if (list[i].getElementsByClassName('threadlist_btn_play j_m_flash') [0].getAttribute('data-type') == 'movideo') {
  80. list[i].remove();
  81. i--;
  82. j--;
  83. }
  84. }
  85. else if (list[i].getElementsByClassName('thumbnail vpic_wrap').length > 0){
  86. if(list[i].getElementsByClassName('thumbnail vpic_wrap')[0].children[0].getAttribute('bpic').match('forum/pic/item')){
  87. list[i].remove();
  88. i--;
  89. j--;
  90. }
  91. }
  92. }
  93. }

QingJ © 2025

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