Add files via upload

This commit is contained in:
Sam Sneed 2024-06-02 13:34:31 +00:00 committed by GitHub
parent 19339c0c12
commit 156f9f3223
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -9,19 +9,37 @@
</head> </head>
<body> <body>
<div id="navBar"> <div id="navBar">
<button id="nwBtn">📄</button> <div id="gptResponse"></div>
<input id="txtUrl" placeholder="Put the website here" name="url" type="text" onkeypress="clickPress(event)" /> <input id="txt" placeholder="Put the request here" name="url" type="text" onkeypress="clickPress(event)" />
<button onclick="go(); return false;" id="goBtn"></button> <button onclick="go(document.getElementById('txt').value); return false;" id="goBtn"></button>
<button onclick="stop(); return false;" id="stopBtn">🛑</button> <script>
<button onclick="back(); return false;" id="backBtn">⬅️</button> function go(q) {
<button onclick="forward(); return false;" id="forwardBtn">➡️</button> let xhr = new XMLHttpRequest();
</div> xhr.open('GET', 'https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@2.9.3/dist/chatgpt.min.js');
<tab-group new-tab-button="true" sortable="true"> xhr.onload = function () {
<webview id="foo" autosize plugins disablewebsecurity></webview> if (xhr.status === 200) {
</tab-group> var chatgptJS = document.createElement('script');
<script src="node_modules/electron-tabs/dist/electron-tabs.js"></script> chatgptJS.textContent = xhr.responseText;
<script type="text/javascript" src="./userscript/userscripts.js"></script> document.head.append(chatgptJS);
<script type="text/javascript" src="./config.js"></script> return (async () => {
<script type="text/javascript" src="./libbrowz.js"></script> 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>
</body> </body>
</html> </html>