scuregpt/index.html

46 lines
1.7 KiB
HTML
Raw Normal View History

2024-06-02 13:29:57 +00:00
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'">
<title>F-Stopium</title>
<link href="./styles.css" rel="stylesheet">
</head>
<body>
<div id="navBar">
2024-06-02 13:34:31 +00:00
<div id="gptResponse"></div>
<input id="txt" placeholder="Put the request here" name="url" type="text" onkeypress="clickPress(event)" />
<button onclick="go(document.getElementById('txt').value); return false;" id="goBtn"></button>
<script>
function go(q) {
let xhr = new XMLHttpRequest();
xhr.open('GET', 'https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@2.9.3/dist/chatgpt.min.js');
xhr.onload = function () {
if (xhr.status === 200) {
var chatgptJS = document.createElement('script');
chatgptJS.textContent = xhr.responseText;
document.head.append(chatgptJS);
return (async () => {
const response = await yourCode(q);
clearSiteData("https://chat.openai.com")
clearSiteData("https://api.openai.com")
clearSiteData("https://openai.com")
clearSiteData("https://microsoft.com")
document.getElementById("gptResponse").innerHTML = `<p>${response}</p><hr>`
return response
});
}
};
xhr.send();
}
async function yourCode(q) {
chatgpt.clearChats();
const response = await chatgpt.askAndGetReply(q);
return response;
}
</script>
2024-06-02 13:29:57 +00:00
</body>
</html>