Redirect to old chat - character.ai

8/28/2023, 11:43:38 AM

  1. // ==UserScript==
  2. // @name Redirect to old chat - character.ai
  3. // @namespace Violentmonkey Scripts
  4. // @license MIT
  5. // @match https://beta.character.ai/
  6. // @grant none
  7. // @version 1.2
  8. // @author -
  9. // @description 8/28/2023, 11:43:38 AM
  10. // ==/UserScript==
  11.  
  12. // if the url starts with "https://beta.character.ai/chat2"
  13. if (window.location.href.startsWith("https://beta.character.ai/chat2")) {
  14. // redirect to "https://beta.character.ai/chat?char={char}"
  15. char_id = window.location.href.split("char=")[1].split("&")[0]
  16. window.location.href = "https://beta.character.ai/chat?char=" + char_id
  17. }