消除知乎推荐

try to take over the world!

  1. // ==UserScript==
  2. // @name 消除知乎推荐
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description try to take over the world!
  6. // @author You
  7. // @match https://www.zhihu.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. // Your code here...
  15.  
  16. let style = `
  17. .Topstory-mainColumnCard .Card:not(.Topstory-tabCard) {
  18. opacity: 0
  19. }
  20. `
  21.  
  22. let dom = document.createElement('style')
  23. dom.innerHTML = style
  24. document.body.appendChild(dom)
  25.  
  26. let toggleDom = document.querySelector('#Popover1-toggle')
  27.  
  28. function interval(time = 10000) {
  29. setTimeout(() => {
  30. doSome(true)
  31. }, time)
  32. }
  33.  
  34. function doSome(flag) {
  35. console.log(new Date(), 'remove placeholder')
  36. toggleDom.setAttribute('placeholder', '');
  37. if (flag) {
  38. interval()
  39. }
  40. }
  41.  
  42. doSome()
  43.  
  44. interval()
  45. })();

QingJ © 2025

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