DDG ai skip intro

skips the intro when visiting duck.ai for the first time

  1. // ==UserScript==
  2. // @name DDG ai skip intro
  3. // @namespace DDG-ai-skip-intro
  4. // @match https://duckduckgo.com/?q=DuckDuckGo+AI+Chat&ia=chat&duckai=*
  5. // @grant none
  6. // @version 1.0
  7. // @author thismoon
  8. // @description skips the intro when visiting duck.ai for the first time
  9. // @license GNU GPLv3
  10. // ==/UserScript==
  11.  
  12. function getCookie(name) {
  13. const value = `; ${document.cookie}`;
  14. const parts = value.split(`; ${name}=`);
  15. if (parts.length === 2) return parts.pop().split(";").shift();
  16. }
  17.  
  18. function setCookie(name, value) {
  19. document.cookie = name + "=" + (value || "") + "; path=/";
  20. }
  21.  
  22. if (getCookie("dcm") === undefined) {
  23. // GPT-4o: 3
  24. // Claude 3: 1
  25. // Llama: 5
  26. // Mixtral: 6
  27. let x = "3";
  28. setCookie("dcm", x);
  29. }
  30. //else{
  31. // console.log(getCookie("dcm"))
  32. //}