纽约时报查看更多

去除纽约时报的订阅提示并显示更多内容(不一定能完全显示)

安装此脚本?
作者推荐脚本

您可能也喜欢DeepL无免费使用限额

安装此脚本
  1. // ==UserScript==
  2. // @name 纽约时报查看更多
  3. // @namespace https://github.com/gui-ying233/MoreFreeNYT
  4. // @version 1.0.4
  5. // @description 去除纽约时报的订阅提示并显示更多内容(不一定能完全显示)
  6. // @author 鬼影233
  7. // @license MIT
  8. // @match https://*.nytimes.com/*
  9. // @exclude https://*.nytimes.com/
  10. // @exclude https://*.nytimes.com/international/
  11. // @exclude https://*.nytimes.com/ca/
  12. // @exclude https://*.nytimes.com/es/
  13. // @exclude https://*.nytimes.com/section/*
  14. // @icon https://www.nytimes.com/favicon.ico
  15. // @supportURL https://github.com/gui-ying233/MoreFreeNYT/issues
  16. // @run-at document-start
  17. // ==/UserScript==
  18.  
  19. (() => {
  20. "use strict";
  21. if (
  22. ["/", "/international/", "/ca/", "/es/", "/section/us"].includes(
  23. document.location.pathname
  24. )
  25. )
  26. return;
  27. const originalRemoveChild = Element.prototype.removeChild;
  28. Element.prototype.removeChild = function (...args) {
  29. if (
  30. args[0]?.classList?.contains("StoryBodyCompanionColumn") ||
  31. (args[0]?.tagName === "P" &&
  32. args[0].parentElement?.parentElement?.classList.contains(
  33. "StoryBodyCompanionColumn"
  34. ))
  35. )
  36. return args[0];
  37. return originalRemoveChild.apply(this, args);
  38. };
  39. document.head.appendChild(
  40. Object.assign(document.createElement("style"), {
  41. textContent:
  42. '#gateway-content,div[id^=lire-ui],#body-container>div[data-testid="onsite-messaging-unit-athleticGateway"]{display:none}body,.vi-gateway-container{position:initial!important}div.vi-gateway-container>div[class^="css"]{background:initial}',
  43. })
  44. );
  45. })();

QingJ © 2025

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