Better LMSYS Chat

make chat lmsys chat better and clean

当前为 2024-03-16 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Better LMSYS Chat
  3. // @namespace https://github.com/insign/better-lmsys-chat
  4. // @version 202403152308
  5. // @description make chat lmsys chat better and clean
  6. // @match https://chat.lmsys.org
  7. // @icon https://www.google.com/s2/favicons?sz=64&domain=lmsys.org
  8. // @author Hélio <insign@gmail.com>
  9. // @copyright Hélio <insign@gmail.com>
  10. // @license WTFPL
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict'
  15. const $ = document.querySelector.bind(document)
  16. const again = (f, ms = 100) => setTimeout(f, ms)
  17. const hide = el => el.style.display = 'none'
  18. const remove = (el) => el.remove()
  19. const onceExists = (sel, callback) => sel ? callback(sel) : again(() => onceExists(sel, callback))
  20.  
  21. onceExists($('.svelte-1ed2p3z'), remove) // Rules
  22. onceExists($('#ack_markdown'), remove) // Terms
  23.  
  24.  
  25. })()