P9IDFilter

unofficial helper for psnine.com (PSNINE)

  1. // ==UserScript==
  2. // @name P9IDFilter
  3. // @description unofficial helper for psnine.com (PSNINE)
  4. // @author jimmyleo
  5. // @namespace com.jimmyleo.psnine.idfilter
  6. // @include http://*psnine.com/*
  7. // @version 0.04
  8. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
  9. // ==/UserScript==
  10.  
  11. var m_strBoringID = new Array("");
  12.  
  13. $(document).ready(function(){
  14. if ( 0 === location.pathname.indexOf('/topic/') || 0 === location.pathname.indexOf('/gene/') ){
  15. Filter('div.post');
  16. }
  17. else{
  18. Filter('li');
  19. }
  20. });
  21.  
  22. function Filter( ParentClassPattern ){
  23. $('a').each( function(index){
  24. var strID = $(this).text();
  25. if ( -1 !== $(this).attr('class').indexOf('node') ){
  26. for (var i = 0; i < m_strBoringID.length; i++) {
  27. if ( m_strBoringID[i] == strID ) {
  28. $(this).parents(ParentClassPattern).hide();
  29. break;
  30. }
  31. }
  32. }
  33. }
  34. );
  35. }