WideScreen Chat

Full WideScreen Chat

目前为 2024-05-24 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name WideScreen Chat
  3. // @version 1.85
  4. // @description Full WideScreen Chat
  5. // @author Florentinity
  6. // @match https://character.ai/*
  7. // @match https://old.character.ai/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=character.ai
  9. // @namespace https://greasyfork.org/users/1100373
  10. // ==/UserScript==
  11. (function() {
  12. function WideScreen()
  13. {
  14. if(document.URL.startsWith("https://old.character.ai/chat"))
  15. {
  16. if(document.URL.includes("/chat2") || document.URL.includes("/chat")){
  17. document.body.getElementsByClassName("apppage").item(0).firstElementChild.attributes.style.value = "height: 100%; display: flex; flex-direction: column; overflow-y: hidden; min-width: 300px; max-width: 7680; margin: 0px auto;"
  18. document.getElementsByClassName("container-fluid chatbottom").item(0).attributes.item(1).value = "max-width: 7680;"}
  19. if(document.URL.includes("/chat"))
  20. {
  21. document.getElementsByClassName("container-fluid chattop").item(0).attributes.item(1).value = "max-width: 7680"
  22. }
  23. }
  24.  
  25. if(document.URL.startsWith("https://character.ai/chat"))
  26. {
  27. var Chat = document.getElementsByClassName("overflow-x-hidden overflow-y-scroll px-1 flex flex-col-reverse min-w-full hide-scrollbar").item(0).children
  28.  
  29. for(var i = 0; i < Chat.length; i++)
  30. {
  31. Chat.item(i).style = "min-width:100%"
  32. document.getElementsByClassName("flex w-full flex-col max-w-2xl").item(0).style = "min-width:100%"
  33. }
  34. }
  35. }
  36. setTimeout(() => { setInterval(WideScreen, 100) }, 1000);
  37. })();