Better LMSYS Chat

make chat lmsys chat better and clean

目前为 2024-03-16 提交的版本。查看 最新版本

// ==UserScript==
// @name         Better LMSYS Chat
// @namespace    https://github.com/insign/better-lmsys-chat
// @version      2024-03-15
// @description  make chat lmsys chat better and clean
// @match        https://chat.lmsys.org/
// @icon         https://www.google.com/s2/favicons?sz=64&domain=lmsys.org
// @author       Hélio <[email protected]>
// @copyright    Hélio <[email protected]>
// @grant        none
// ==/UserScript==

(function() {
  'use strict'
  const $          = document.querySelector.bind(document)
  const again      = (f, ms = 100) => window.setTimeout(f, ms)
  const hide       = el => el.style.display = 'none'
  const remove     = (el) => el.remove()
  const onceExists = (sel, callback) => sel ? callback(sel) : again(() => onceExists(sel, callback))

  onceExists($('.svelte-1ed2p3z'), remove) // Rules
  onceExists($('#ack_markdown'), remove) // Terms

})()