更宽的AI对话窗口↔️

使 ChatGPT/claude/Kimi/通义/智谱GLM/天工 中 的AI对话窗口更宽.

当前为 2024-07-24 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Wider AI Chat↔️
  3. // @name:zh-CN 更宽的AI对话窗口↔️
  4. // @namespace http://tampermonkey.net/
  5. // @version 0.1.7
  6. // @description Make the AI chat dialog window wider for ChatGPT/claude/Kimi/通义/智谱GLM/天工
  7. // @description:zh-CN 使 ChatGPT/claude/Kimi/通义/智谱GLM/天工 中 的AI对话窗口更宽.
  8. // @author You
  9. // @match http*://chatgpt.com/c/*
  10. // @match http*://chatgpt.com/*
  11. // @match http*://new.oaifree.com/*
  12. // @match http*://*.new.oaifree.com/*
  13. // @match https://shared.oaifree.com/*
  14. // @match http*://www.aicnn.cn/oaifree/*
  15. // @match http*://chat.aicnn.xyz/*
  16. // @match http*://plus.aivvm.com/*
  17. // @match http*://kimi.moonshot.cn/chat/*
  18. // @match http*://kimi.moonshot.cn/*
  19. // @match http*://tongyi.aliyun.com/qianwen*
  20. // @match http*://chatglm.cn/*
  21. // @match https://demo.fuclaude.com/*
  22. // @match https://claude.ai/*
  23. // @icon data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHJlY3Qgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiByeD0iNSIgcnk9IjUiIGZpbGw9IiM2YmIiLz4KICA8cGF0aCBkPSJtMTcgMTMuNyA0LTQtNC00bS0xMCA4LTQtNCA0LTRtMTMuOTk5IDMuODI1SDMuMjE1Ii8+CiAgPHBhdGggZD0iTTE5IDE2aC0yLjVhLjk5LjkgMCAwIDAtLjc3NS4zNzVsLTIuOSAzLjY1Yy0uNC41LTEuMTYyLjUtMS41NjMgMGwtMi45MjUtMy42NUEuOTkuOSAwIDAgMCA3LjUgMTZINWMtMS42NjMgMC0zLTEuMzM4LTMtM1Y2YzAtMS42NjIgMS4zNS0zIDMtM2gxNGEzIDMgMCAwIDEgMyAzdjdjMCAxLjY2Mi0xLjM1IDMtMyAzWiIgZmlsbC1vcGFjaXR5PSIuMTYiIHN0cm9rZT0iI0VFRSIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIvPgo8L3N2Zz4K
  24. // @license AGPL-v3.0
  25. // @author Yearly
  26. // @grant GM_addStyle
  27. // ==/UserScript==
  28.  
  29. (function() {
  30.  
  31. if ( /kimi.moonshot.cn/.test(location.href) ) {
  32. console.log("kimi")
  33. GM_addStyle(`
  34. div[data-testid] div[data-index] div.MuiBox-root {
  35. max-width: 98% !important;
  36. }
  37. `);
  38. } else if ( /tongyi.aliyun.com/.test(location.href) ) {
  39. console.log("tongyi")
  40. GM_addStyle(`
  41. div[class^=mainContent] div[class^=questionItem--] {
  42. width:90% !important;
  43. max-width: 90vw;
  44. }
  45. div[class^=mainContent] div[class^=answerItem--] {
  46. width:90% !important;
  47. max-width: 90vw;
  48. }
  49. `);
  50. } else if ( /www.tiangong.cn/.test(location.href) ) {
  51. console.log("tiangong")
  52. GM_addStyle(`
  53. label.w-full {
  54. max-width: 90%;
  55. --search-max-width: 90%;
  56. }
  57. :root {
  58. --search-max-width: 90%;
  59. }
  60. `);
  61. } else if (/chatglm.cn/.test(location.href)) {
  62. console.log("chatglm")
  63. GM_addStyle(`
  64. div.conversation-inner.dialogue > div.conversation-list.detail > div.item.conversation-item {
  65. max-width: 95vw !important;
  66. }
  67. .markdown-body.md-body {
  68. max-width: 95vw !important;
  69. }
  70. `);
  71. } else {
  72. console.log("chatgpt/claude")
  73. GM_addStyle(`
  74. .xl\:max-w-\[48rem\] {
  75. width:95% !important;
  76. max-width:96% !important;
  77. }
  78. div.mx-auto.md:max-w-3xl {
  79. max-width: 90%;
  80. }
  81. div.mx-auto.flex {
  82. max-width: 90%;
  83. }
  84. pre > div.rounded-md > div.overflow-y-auto {
  85. max-height: 50vh;
  86. overflow: auto;
  87. scrollbar-width: thin;
  88. scrollbar-color: #aaaa #1111;
  89. }
  90. pre > div.rounded-md > div.overflow-y-auto ::-webkit-scrollbar-track {
  91. background: #1111;
  92. }
  93. pre > div.rounded-md > div.overflow-y-auto ::-webkit-scrollbar-thumb {
  94. background: #aaaa;
  95. }
  96. pre > div.rounded-md > div.overflow-y-auto ::-webkit-scrollbar-thumb:hover {
  97. background: #0008;
  98. }
  99. div.ProseMirror.break-words.ProseMirror-focused {
  100. max-width:100%;
  101. }
  102. `);
  103.  
  104. function link_addhref() {
  105. document.querySelectorAll('div[data-message-id] a[rel="noreferrer"]').forEach(function(item) {
  106. if(!item.href){
  107. item.href = item.innerText;
  108. item.target = "_blank"
  109. }
  110. });
  111. setTimeout(link_addhref, 1800);
  112. }
  113. link_addhref();
  114.  
  115. }
  116.  
  117. })();