From 8b5a6589c951d4f6db7b6b6d940b9a2aa05a93e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?TED=20A=2E=20=E2=AD=95?= Date: Mon, 6 Nov 2023 23:55:00 +0000 Subject: [PATCH] Upload files to "/" --- deletechannel.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 deletechannel.js diff --git a/deletechannel.js b/deletechannel.js new file mode 100644 index 0000000..05d1ee1 --- /dev/null +++ b/deletechannel.js @@ -0,0 +1,32 @@ +let lines = [ +]; + +lines.forEach(line => { + fetch("https://sketchersunited.org/channels/2/posts/" + line.split("/")[4], { + "credentials": "include", + "headers": { + "Accept": "application/json, text/plain, */*", + "X-CSRF-TOKEN": document.querySelector('meta[name="csrf-token"]').content, + "X-XSRF-TOKEN": document.cookie.split("XSRF-TOKEN=")[1], + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-origin" + }, + "referrer": line, + "method": "DELETE", + "mode": "cors" + }) + .then(response => { + if (response.ok) { + return response.json(); + } else { + throw new Error('Network response was not ok.'); + } + }) + .then(data => { + console.log(data); + }) + .catch(error => { + console.error('There was a problem with the fetch operation:', error); + }); +});