知乎去广告展开所有回答

去除知乎广告,自动展开所有回答

  1. // ==UserScript==
  2. // @name 知乎去广告展开所有回答
  3. // @namespace https://www.zhihu.com/
  4. // @version 1.0
  5. // @description 去除知乎广告,自动展开所有回答
  6. // @author 老胡
  7. // @match https://www.zhihu.com
  8. // @match https://www.zhihu.com/question/*
  9. // @require http://cdn.bootcss.com/jquery/1.8.3/jquery.min.js
  10. // @run-at document-end
  11. // @grant none
  12. // ==/UserScript==
  13.  
  14. (function() {
  15. 'use strict';
  16.  
  17. clearAdvert();
  18.  
  19. if(document.URL.indexOf("https://www.zhihu.com/question/") != -1) {
  20. autoExpandQuestionInfo();
  21. }
  22.  
  23. //自动展开问题全部信息,同时展示所有回答
  24. function autoExpandQuestionInfo() {
  25. $('.Button.QuestionRichText-more.Button--plain').click();
  26. var moreAnswers = $('.QuestionMainAction');
  27. if(moreAnswers.length > 0) {
  28. moreAnswers[0].click();
  29. }
  30. }
  31.  
  32. //去除首页广告
  33. function clearAdvert() {
  34. $('.Card.Banner').remove();
  35. }
  36. })();

QingJ © 2025

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