Skip to content

Instantly share code, notes, and snippets.

@sunzsh
Last active July 12, 2023 09:20
Show Gist options
  • Save sunzsh/6acdb6b269fe79d61bf2b4653c714650 to your computer and use it in GitHub Desktop.
Save sunzsh/6acdb6b269fe79d61bf2b4653c714650 to your computer and use it in GitHub Desktop.
javascript:(function(){document.querySelector('.hide-article-pos').remove();document.querySelector('.article_content').style.height='initial';})()
@Jqtao
Copy link

Jqtao commented Jun 6, 2023

这个是不是失效了

@hailang151
Copy link

应该是的

@augustVino
Copy link

这个脚本的代码和 csdn 复制的代码是一样的..... @sunzsh

@augustVino
Copy link

javascript: (function () {
  var hide = document.querySelector('.hide-article-pos');
  var content = document.querySelector('.article_content');
  if (hide && content) {
    hide.remove();
    content.style.height = 'initial';
  }
  document.querySelectorAll('.hide-preCode-bt').forEach(function (item) {
    item.dispatchEvent(new Event('click', { bubbles: true }));
  });
})();

@sunzsh
Copy link
Author

sunzsh commented Jul 12, 2023

这个脚本的代码和 csdn 复制的代码是一样的..... @sunzsh

再试试,但是这种只针对“关注展开”的情况

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment