ChatGPT remove start notification

This script removes the ChatGPT start notification

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name        ChatGPT remove start notification
// @namespace   ChatGPT
// @match       https://chat.openai.com/
// @icon        https://chat.openai.com/apple-touch-icon.png
// @grant       none
// @version     1.1
// @author      ccuser44
// @license     CC0
// @description This script removes the ChatGPT start notification
// ==/UserScript==

/*
To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide.
This software is distributed without any warranty.
You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
*/

var debounce = false;

function clickButton() {
	var foundMain = false;
	for (const button of document.getElementsByClassName("btn relative btn-primary")) {
		if (button.firstElementChild.textContent == "Okay, let’s go") {
			foundMain = true;
			button.click();
		};
	};
};

function onLoad() {
	console.log(debounce);
	if (!debounce) {
		debounce = true;
		clickButton();
		setTimeout(clickButton, 100);
		for (var i = 1; i <= 6; i++) {
			setTimeout(clickButton, i * 500);
		};
	};
};

if (document.readyState == "complete") {
	setTimeout(onLoad, 1500);
} else {
	window.addEventListener("load", function() {
		setTimeout(onLoad, 1500);
	}, "once");
};