BlockSuckerHuang

BlockSuckerHuang!

当前为 2019-04-25 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name BlockSuckerHuang
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description BlockSuckerHuang!
  6. // @author ...
  7. // @match https://pincong.rocks/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. // Your code here...
  15.  
  16. var as = document.getElementsByTagName('a')
  17. for(var i in as){
  18. var node = as[i];
  19.  
  20. if(node.hasAttribute == undefined){
  21. continue;
  22. }
  23.  
  24. if(!node.hasAttribute('data-id')){
  25. continue;
  26. }
  27. var id = node.getAttribute('data-id');
  28. if(id.toString() != '3700'){
  29. continue;
  30. }
  31.  
  32. var classType = node.getAttribute('class');
  33. if(classType == 'aw-user-name'){
  34. node.parentNode.style = 'display:none';
  35. }else if(classType.indexOf('aw-user-img') >= 0){
  36. node.parentNode.parentNode.style = 'display:none';
  37. }
  38. }
  39. })();