Delete All ChatGPT ChatTree🌳 History

Delete ChatGPT ChatTree IndexedDB database. Please think twice before enabling this script

  1. // ==UserScript==
  2. // @name Delete All ChatGPT ChatTree🌳 History
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description Delete ChatGPT ChatTree IndexedDB database. Please think twice before enabling this script
  6. // @author cuizhenzhi
  7. // @match https://chat.openai.com/*
  8. // @grant none
  9. // @license GPL-2.0-only
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. const DB_NAME = 'ChatTreeDB';
  16. console.log('try to delete:');
  17.  
  18. var req = indexedDB.deleteDatabase(DB_NAME);
  19. req.onsuccess = function () {
  20. console.log("Deleted database successfully");
  21. };
  22. req.onerror = function () {
  23. console.log("Couldn't delete database");
  24. };
  25. req.onblocked = function () {
  26. console.log("Couldn't delete database due to the operation being blocked");
  27. };
  28. })();