本地黑名单-知乎

我的地盘,我做主!

目前为 2020-05-27 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name 本地黑名单-知乎
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.2.1
  5. // @description 我的地盘,我做主!
  6. // @author lavaf
  7. // @match https://www.zhihu.com/question/*
  8. // @match https://www.zhihu.com/question/*/answer/*
  9. // @match https://www.zhihu.com
  10. // @grant none
  11. // @require https://cdn.bootcss.com/jquery/3.4.1/jquery.js
  12. // ==/UserScript==
  13.  
  14. (function () {
  15. 'use strict';
  16. ////www.zhihu.com/people/
  17. let blackList = ['la-la-la-la-la-55-20', 'mazhihang', 'song-ling-dao-jie-shou-huo-yan-jing-hua',
  18. 'hong-liao-2', 'wang-tang-min', 'qing-er-wu-hen', 'li-wei-long-69', 'chen-yun-fei-14-82', 'su-mo-bu-pao-mo',
  19. 'wgt-33', 'mao-cheng-wei', 'fan-ru-yun-98', 'zhang-zan-72', 'lancer-fz', 'tian-kong-zhi-shang-2', 'linyizy',
  20. 'bbbleung', 'huajianduzhuo', 'saojikao', 'xiao-bao-de-a-ke', 'chen-yun-59-15', 'chen-bei-85-18',
  21. 'bai-feng-nong-yu', 'stevenjau', 'xia-yun-xi-56', 'jeromewu', 'rodriguez-89', 'lan-de-qi-ming-81-72',
  22. 'qiu-shui-luo-luo', 'tie-fo-ye', 'bdqd-67', 'si-tu-feng-79', 'gyi-liu', 'yin-wei-ta-shi-qiu-qiu', 'wang-ye-98-59',
  23. 'da-tou-61-15', 'zhao-yi-19-56', 'sa-sa-78-68', 'chao-ji-wu-di-niang-niang-pao',
  24. 'yangbingli', 'chen-xiao-pan-50', 'du-gu-bu-bai-79', 'Ofeet', 'maomaobear', 'ya-meng-su-ren', 'xia-mu-22-85-64',
  25. 'la-la-la-63-18-88', 'winter-91-47', 'long-long-18-2', 'yong-yuan-bian-dong', 'hai-tao-ye-jiao-bei-ji-xiong',
  26. 'liu-ying-jie-11-72', 'xiao-xiao-xiao-79-93']
  27. let hash=['0aafe9fcf86caa45f8aaaf345396916b']
  28. setInterval(function () {
  29. console.log('start')
  30. let nameList = $("div.CommentItemV2");
  31. nameList.each(function (i, e) {
  32. if ($(e).attr('data-lavaf') !== '1') {
  33. let id = $(e).find("a.UserLink-link").attr("href");
  34. for (const blackListKey in blackList) {
  35. if (blackList.hasOwnProperty(blackListKey)) {
  36. //console.log(id);
  37. if ("//www.zhihu.com/people/" + blackList[blackListKey] === id) {
  38. $(e).text(id + " 此用户已经被屏蔽")
  39. $(e).attr('data-lavaf', '1');
  40. break;
  41. }
  42. }
  43. }
  44.  
  45. }
  46.  
  47. });
  48. let List = $("div.AnswerItem");
  49. List.each(function (i, e) {
  50. if ($(e).attr('data-lavaf') !== '1') {
  51. let id = $(e).find('a.UserLink-link').attr("href");
  52. if (id == null) {
  53. let extra = $(e).attr("data-za-extra-module");
  54. let i= JSON.parse(extra).card.content.author_member_hash_id;
  55. for (const h in hash){
  56. if (hash.hasOwnProperty(h)) {
  57. if (h == i) {
  58. $(e).text(id + " 此用户已经被屏蔽")
  59. $(e).attr('data-lavaf', '1');
  60. }
  61. }
  62. }
  63. } else
  64. for (const blackListKey in blackList) {
  65. if (blackList.hasOwnProperty(blackListKey)) {
  66. //console.log(id);
  67. if ("//www.zhihu.com/people/" + blackList[blackListKey] === id) {
  68. $(e).text(id + " 此用户已经被屏蔽")
  69. $(e).attr('data-lavaf', '1');
  70. }
  71. }
  72. }
  73. let name = $(e).find('span.AuthorInfo-name');
  74. //console.log('name:'+name);
  75. if (name.text() === '匿名用户') {
  76. $(e).text(id + " 此用户已经被屏蔽")
  77. $(e).attr('data-lavaf', '1');
  78. }
  79. }
  80.  
  81. });
  82. }, 500)
  83.  
  84. })();

QingJ © 2025

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