Just Read

Simplify your reading experience

目前为 2023-07-02 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Just Read
  3. // @description Simplify your reading experience
  4. // @license MIT
  5. // @homepageURL https://github.com/isolcat/JustRead
  6. // @match https://www.zhihu.com/**
  7. // @version 0.2.1
  8. // @namespace https://github.com/isolcat
  9. // ==/UserScript==
  10.  
  11.  
  12. const topstoryElement = document.querySelector('.Topstory');
  13. const creators = document.querySelector('.css-1oy4rvw');
  14. const elements = document.querySelectorAll('.Card.TopstoryItem.TopstoryItem-isRecommend');
  15. const content = document.querySelector('.Topstory-mainColumn')
  16. const questionList = document.querySelector('.QuestionAnswers-answers')
  17. const videoTab = document.querySelectorAll('.TopstoryTabs-link.Topstory-tabsLink')
  18. const searchHot = document.querySelector('.css-1oy4rvw')
  19. const zhiUrl = window.location.href
  20.  
  21.  
  22. if (zhiUrl.includes('question')) {
  23. creators.remove()
  24. questionList.style.margin = '0 auto'
  25. } else if (zhiUrl.includes('search')) {
  26. searchHot.remove()
  27. } else {
  28. content.style.margin = '0 auto'
  29. content.style.width = '960px'
  30. videoTab[3].style.display = 'none';
  31. }
  32.  
  33.  
  34. content.style.margin = '0 auto'
  35. content.style.width = '960px'
  36.  
  37. if (topstoryElement) {
  38. topstoryElement.querySelector('div')?.remove();
  39. }
  40.  
  41. if (creators) {
  42. creators.remove();
  43. }
  44.  
  45. function removeElement() {
  46. var elements = document.querySelectorAll('.css-i2yo90');
  47. elements.forEach(function (element) {
  48. var parentElement = element.closest('.Card.TopstoryItem.TopstoryItem-isRecommend');
  49. if (parentElement) {
  50. parentElement.remove();
  51. }
  52. });
  53. }
  54.  
  55. setInterval(removeElement, 100);
  56.  
  57.  
  58.  
  59.  

QingJ © 2025

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