Skip to content
This repository has been archived by the owner on Jul 25, 2024. It is now read-only.

Commit

Permalink
Update extension.js
Browse files Browse the repository at this point in the history
updated a bypass from blocking by an origin parameter
  • Loading branch information
Anonymous-cat1 authored Jan 5, 2024
1 parent d751c6c commit eb5b023
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
return '';}
}

setApiUrl(args) {
setApiUrl(args) {
const newApiUrl = args.URL;
// Update the api_url variable
api_url = newApiUrl;
Expand All @@ -246,14 +246,16 @@
});
}


singlePrompt(args) {
const prompt = args.PROMPT;
const prompt = args.PROMPT;
const fakerefer = "https://" + Math.round(Math.random() * 40000000) + ".com"
// this is to bypass some apis from blocking scratch ides

return Scratch.fetch(api_url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Origin': ''+ fakerefer +'',
},
body: JSON.stringify({
model: "gpt-3.5-turbo",
Expand Down

0 comments on commit eb5b023

Please sign in to comment.