Advertisement
Guest User

Untitled

a guest
Jul 31st, 2015
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name        和谐华新助手
  3. // @include     http://bbs.huasing.org/*
  4. // @version     0.1
  5. // @description Hide posts from penzi
  6. // @require     http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js
  7. // @grant       GM_addStyle
  8. // ==/UserScript==
  9.  
  10. // 可以自己加的 ^_^ 我这是测试数据而已 不是攻击啊,别喷我
  11. var penzi = ['唐甬','materialist']
  12.  
  13. // hide post in 华新鲜事
  14. $('div.brow2 div[class="ccol6 brow2h"] a[class="nickname bblack"]').each(function(index, element) {
  15.         if ($.inArray($(this).attr('title'), penzi) > -1) {
  16.             $(this).parent().parent().parent().hide();
  17.         }
  18. });
  19.  
  20. // hide post in 版面
  21. $('div.brow2 div[class="bcol5 brow2h"] a[class="nickname bblack"]').each(function(index, element) {
  22.         if ($.inArray($(this).attr('title'), penzi) > -1) {
  23.             $(this).parent().parent().parent().hide();
  24.         }
  25. });
  26.  
  27. // hide 在帖子里的
  28. $('div.authordiv div:first-child>a:first-child').each(function(index, element) {
  29.         if ($.inArray($(this).text(), penzi) > -1) {
  30.             $(this).parent().parent().hide();
  31.             $(this).parent().parent().next().hide();
  32.         }
  33. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement