Skip to content

Commit

Permalink
Remove corsproxy
Browse files Browse the repository at this point in the history
  • Loading branch information
agatemosu committed Mar 16, 2024
1 parent 9edfe7d commit 265bfe7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ async function share(shareButton, sharePositions) {

const values = await Promise.all(
chunks.map(async (chunk) => {
const response = await fetch("https://corsproxy.org/?https://hastebin.skyra.pw/documents", {
const response = await fetch("https://hastebin.skyra.pw/documents", {
method: "POST",
body: chunk,
});
Expand All @@ -332,7 +332,7 @@ async function share(shareButton, sharePositions) {
);

const strings = values.map((v) => v.key);
const res = await fetch("https://corsproxy.org/?https://hastebin.skyra.pw/documents", {
const res = await fetch("https://hastebin.skyra.pw/documents", {
method: "POST",
body: encodeUnicode(JSON.stringify(strings)),
});
Expand Down Expand Up @@ -371,13 +371,13 @@ async function load() {
console.log(`Loading with the id "${hash}"...`);

// Get the chunks
const response = await fetch(`https://corsproxy.org/?https://hastebin.skyra.pw/raw/${hash}`);
const response = await fetch(`https://hastebin.skyra.pw/raw/${hash}`);
const text = await response.text();
const chunks = JSON.parse(decodeUnicode(text));

// Get the content of the chunks
const chunksData = await Promise.all(chunks.map(async (chunk) => {
const chunkResponse = await fetch(`https://corsproxy.org/?https://hastebin.skyra.pw/raw/${chunk}`);
const chunkResponse = await fetch(`https://hastebin.skyra.pw/raw/${chunk}`);
return chunkResponse.text();
}));

Expand Down

0 comments on commit 265bfe7

Please sign in to comment.