diff --git a/README.md b/README.md
index 680b152..13ac1d2 100644
--- a/README.md
+++ b/README.md
@@ -23,7 +23,7 @@ As to my knowledge, you cannot change the use or time limit on the invites, nor
2. Wait until Discord is **fully** loaded
3. Copy this code:
```js
-/* DiscordFriendInvites 1.1.0 by woodendoors7 */ var outputCreate,selectInvite,token,div,closeBtn,offsetLeft,offsetTop,html='\n
\n \n
\n
\n
\n Create Invite\n
\n
Do It \n
\n \n
\n
\n View Invite\n
\n
\n \n \n \n
View Info \n
\n
\n
Welcome!
\n
\n Delete All Invites \n
\n
\n
',css="\n #mainWindow {\n position: absolute;\n z-index: 9;\n background-color: #2F3136;\n border: 1px solid #3f4147;\n color: white;\n text-align: center;\n height: 270px;\n width: 400px;\n z-index: 1000;\n border-radius: 12px;\n font-family: var(--font-primary);\n }\n\n #reappear{\n display: none;\n }\n\n #closeBtn{\n width: 30px;\n cursor: pointer !important;\n float:right;\n }\n\n .toDisable{\n opacity:0.4;\n pointer-events: none;\n }\n\n #header {\n padding: 10px;\n cursor: move;\n z-index: 10;\n background-color: #5865f2;\n color: #ffe8e9;\n user-select: none;\n font-weight: bold;\n border-top-left-radius:12px;\n border-top-right-radius: 12px;\n\n }\n \n .dividing {\n background-color: #2F3136;\n width: 100%;\n height: 50px;\n text-align: left;\n vertical-align: middle;\n white-space: nowrap;\n line-height: 50px;\n }\n \n .sectionTitle {\n vertical-align: middle;\n margin: 0px;\n font-size: 18px;\n margin-left: 15px;\n }\n \n .sectionButton {\n vertical-align: middle;\n margin-top: auto;\n margin-bottom: auto;\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n box-sizing: border-box;\n background: none;\n border: none;\n border-radius: 3px;\n font-size: 14px;\n font-weight: 500;\n line-height: 16px;\n padding: 2px 16px;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n transition: background-color 170ms ease,color 170ms ease;\n color: var(--white-500);\n background-color: var(--button-secondary-background);\n width: var(--custom-button-button-sm-width);\n height: var(--custom-button-button-sm-height);\n min-width: var(--custom-button-button-sm-width);\n min-height: var(--custom-button-button-sm-height);\n width: auto !important;\n }\n\n .sectionButton:hover{\n background-color: var(--button-secondary-background-hover);\n color: var(--white-500);\n }\n\n .dividing * {\n display: inline;\n }\n \n .textOutput {\n max-width: 93%;\n min-height: 16px;\n cursor: text;\n margin-left: 10px;\n user-select: all;\n padding: 3px;\n text-align: center;\n margin-left: 10px;\n background-color: #1e1f22;\n }";async function inject(){let e=document.createElement("div");e.innerHTML=html,e.innerHTML+=`\n\n`,document.body.appendChild(e),(div=document.getElementById("mainWindow")).style.top="100px",div.style.left="100px",window.addEventListener("mousemove",divMove,!0),document.getElementById("header").addEventListener("mousedown",mouseDown,!1),window.addEventListener("mouseup",mouseUp,!1),document.getElementById("runCreate").addEventListener("click",createElement),document.getElementById("runInfo").addEventListener("click",checkTheInfo),document.getElementById("runDelete").addEventListener("click",deleteInvites),closeBtn=document.getElementById("closeBtn"),outputCreate=document.getElementById("outputCreate"),selectInvite=document.getElementById("selectInvite"),expireAfterCreate=document.getElementById("expireAfterCreate"),maxUsesCreate=document.getElementById("maxUsesCreate"),closeBtn.addEventListener("click",uninject),token=await getToken(),console.log("Got token!"),document.querySelector("#reappear").style="display:block;",document.querySelectorAll(".toDisable").forEach((e=>{e.style.opacity="1",e.style.pointerEvents="auto"})),outputCreate.innerHTML='Welcome! ',fetchInvites(!1)}async function createElement(){outputCreate.innerHTML='Loading . . . ';let e=await fetch("https://discord.com/api/v9/users/@me/invites",{credentials:"include",headers:{"User-Agent":"Mozilla/5.0 (Windows NT 10.0; rv:103.0) Gecko/20100101 Firefox/103.0",Accept:"*/*","Accept-Language":"en,sk;q=0.8,cs;q=0.5,en-US;q=0.3","Content-Type":"application/json",Authorization:token,"X-Discord-Locale":"en-US","X-Debug-Options":"bugReporterEnabled","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-origin","Sec-GPC":"1"},referrer:"https://discord.com/channels/@me",body:"{}",method:"POST",mode:"cors"}),t=await e.json();console.log(t),outputCreate.innerHTML=`https://discord.gg/${t.code} `,"No Invites"==selectInvite.firstChild.innerText&&(selectInvite.innerHTML="");let n=document.createElement("option");n.value=t.code,n.innerText=`discord.gg/${t.code}`,selectInvite.appendChild(n)}async function fetchInvites(e){let t=await fetch("https://discord.com/api/v9/users/@me/invites",{credentials:"include",headers:{"User-Agent":"Mozilla/5.0 (Windows NT 10.0; rv:103.0) Gecko/20100101 Firefox/103.0",Accept:"*/*","Accept-Language":"en,sk;q=0.8,cs;q=0.5,en-US;q=0.3","Content-Type":"application/json",Authorization:token,"X-Discord-Locale":"en-US","X-Debug-Options":"bugReporterEnabled","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-origin","Sec-GPC":"1"},referrer:"https://discord.com/channels/@me",method:"GET",mode:"cors"}),n=await t.json();if(selectInvite.innerHTML="",0==n.length){let e=document.createElement("option");return e.value="none",e.innerText="No Invites",selectInvite.appendChild(e),n}for(let e=0;eLoading . . .';let t,n=await fetchInvites(!0);for(let o=0;oUses: ${t.uses}/${t.max_uses}, Expires in: ${Math.round(t.max_age/60/60)} hours, https://discord.gg/${t.code} `:"Invite not found!"}async function deleteInvites(){await fetch("https://discord.com/api/v9/users/@me/invites",{credentials:"include",headers:{"User-Agent":"Mozilla/5.0 (Windows NT 10.0; rv:103.0) Gecko/20100101 Firefox/103.0",Accept:"*/*","Accept-Language":"en,sk;q=0.8,cs;q=0.5,en-US;q=0.3","Content-Type":"application/json",Authorization:token,"X-Discord-Locale":"en-US","X-Debug-Options":"bugReporterEnabled","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-origin","Sec-GPC":"1"},referrer:"https://discord.com/channels/@me",method:"DELETE",mode:"cors"}),selectInvite.innerHTML="";let e=document.createElement("option");e.value="none",e.innerText="No Invites",selectInvite.appendChild(e),outputCreate.innerHTML='Invites deleted '}"complete"===document.readyState&&inject();var clicked=!1;async function mouseUp(){clicked=!1}async function mouseDown(e){clicked=!0,offsetLeft=div.offsetLeft-e.clientX,offsetTop=div.offsetTop-e.clientY}function divMove(e){clicked&&(div.style.position="absolute",div.style.top=e.clientY+offsetTop+"px",div.style.left=e.clientX+offsetLeft+"px")}async function getToken(){return new Promise((function(e){outputCreate.innerHTML='Getting token... Please, switch to a random channel on Discord to obtain token!
',outputCreate.innerHTML='Getting token... Please, switch to a random channel on Discord to obtain token!
',window.__request=window.XMLHttpRequest,window.XMLHttpRequest=class extends window.__request{constructor(){super(...arguments),this._reqHead=this.setRequestHeader,this.setRequestHeader=function(t,n){this._reqHead(t,n),"Authorization"===t&&(window.XMLHttpRequest=window.__request,e(n))}.bind(this)}}}))}async function uninject(){window.XMLHttpRequest=window.__request,window.removeEventListener("mousemove"),document.getElementById("header").removeEventListener("mousedown"),window.removeEventListener("mouseup"),document.getElementById("mainWindow").remove(),inject=null,createElement=null,inject=null,fetchInvites=null,checkTheInfo=null,deleteInvites=null,removeEventListener("mouseMove",window),console.log("Goodbye!")}console.log("Hello!");
+/* DiscordFriendInvites 1.1.1 by woodendoors7 */ var outputCreate,selectInvite,token,div,closeBtn,offsetLeft,offsetTop,html='\n \n \n
\n
\n
\n Create Invite\n
\n
Do It \n
\n \n
\n
\n View Invite\n
\n
\n \n \n \n
View Info \n
\n
\n
Welcome!
\n
\n Delete All Invites \n
\n
\n
',css="\n #mainWindow {\n position: absolute;\n z-index: 9;\n background-color: #2F3136;\n border: 1px solid #3f4147;\n color: white;\n text-align: center;\n height: 270px;\n width: 400px;\n z-index: 1000;\n border-radius: 12px;\n font-family: var(--font-primary);\n }\n\n #reappear{\n display: none;\n }\n\n #closeBtn{\n width: 30px;\n cursor: pointer !important;\n float:right;\n }\n\n .toDisable{\n opacity:0.4;\n pointer-events: none;\n }\n\n #header {\n padding: 10px;\n cursor: move;\n z-index: 10;\n background-color: #5865f2;\n color: #ffe8e9;\n user-select: none;\n font-weight: bold;\n border-top-left-radius:12px;\n border-top-right-radius: 12px;\n\n }\n \n .dividing {\n background-color: #2F3136;\n width: 100%;\n height: 50px;\n text-align: left;\n vertical-align: middle;\n white-space: nowrap;\n line-height: 50px;\n }\n \n .sectionTitle {\n vertical-align: middle;\n margin: 0px;\n font-size: 18px;\n margin-left: 15px;\n }\n \n .sectionButton {\n vertical-align: middle;\n margin-top: auto;\n margin-bottom: auto;\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n box-sizing: border-box;\n background: none;\n border: none;\n border-radius: 3px;\n font-size: 14px;\n font-weight: 500;\n line-height: 16px;\n padding: 2px 16px;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n transition: background-color 170ms ease,color 170ms ease;\n color: var(--white-500);\n background-color: var(--button-secondary-background);\n width: var(--custom-button-button-sm-width);\n height: var(--custom-button-button-sm-height);\n min-width: var(--custom-button-button-sm-width);\n min-height: var(--custom-button-button-sm-height);\n width: auto !important;\n }\n\n .sectionButton:hover{\n background-color: var(--button-secondary-background-hover);\n color: var(--white-500);\n }\n\n .dividing * {\n display: inline;\n }\n \n .textOutput {\n max-width: 93%;\n min-height: 16px;\n cursor: text;\n margin-left: 10px;\n user-select: all;\n padding: 3px;\n text-align: center;\n margin-left: 10px;\n background-color: #1e1f22;\n }";async function inject(){let e=document.createElement("div");e.innerHTML=html,e.innerHTML+=`\n\n`,document.body.appendChild(e),(div=document.getElementById("mainWindow")).style.top="100px",div.style.left="100px",window.addEventListener("mousemove",divMove,!0),document.getElementById("header").addEventListener("mousedown",mouseDown,!1),window.addEventListener("mouseup",mouseUp,!1),document.getElementById("runCreate").addEventListener("click",createElement),document.getElementById("runInfo").addEventListener("click",checkTheInfo),document.getElementById("runDelete").addEventListener("click",deleteInvites),closeBtn=document.getElementById("closeBtn"),outputCreate=document.getElementById("outputCreate"),selectInvite=document.getElementById("selectInvite"),expireAfterCreate=document.getElementById("expireAfterCreate"),maxUsesCreate=document.getElementById("maxUsesCreate"),closeBtn.addEventListener("click",uninject),token=await getToken(),console.log("Got token!"),document.querySelector("#reappear").style="display:block;",document.querySelectorAll(".toDisable").forEach((e=>{e.style.opacity="1",e.style.pointerEvents="auto"})),outputCreate.innerHTML='Welcome! ',fetchInvites(!1)}async function createElement(){outputCreate.innerHTML='Loading . . . ';let e=await fetch("https://discord.com/api/v9/users/@me/invites",{credentials:"include",headers:{"User-Agent":"Mozilla/5.0 (Windows NT 10.0; rv:103.0) Gecko/20100101 Firefox/103.0",Accept:"*/*","Accept-Language":"en,sk;q=0.8,cs;q=0.5,en-US;q=0.3","Content-Type":"application/json",Authorization:token,"X-Discord-Locale":"en-US","X-Debug-Options":"bugReporterEnabled","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-origin","Sec-GPC":"1"},referrer:"https://discord.com/channels/@me",body:"{}",method:"POST",mode:"cors"}),t=await e.json();console.log(t),outputCreate.innerHTML=`https://discord.gg/${t.code} `,"No Invites"==selectInvite.firstChild.innerText&&(selectInvite.innerHTML="");let n=document.createElement("option");n.value=t.code,n.innerText=`discord.gg/${t.code}`,selectInvite.appendChild(n)}async function fetchInvites(e){let t=await fetch("https://discord.com/api/v9/users/@me/invites",{credentials:"include",headers:{"User-Agent":"Mozilla/5.0 (Windows NT 10.0; rv:103.0) Gecko/20100101 Firefox/103.0",Accept:"*/*","Accept-Language":"en,sk;q=0.8,cs;q=0.5,en-US;q=0.3","Content-Type":"application/json",Authorization:token,"X-Discord-Locale":"en-US","X-Debug-Options":"bugReporterEnabled","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-origin","Sec-GPC":"1"},referrer:"https://discord.com/channels/@me",method:"GET",mode:"cors"}),n=await t.json();if(selectInvite.innerHTML="",0==n.length){let e=document.createElement("option");return e.value="none",e.innerText="No Invites",selectInvite.appendChild(e),n}for(let e=0;eLoading . . .';let t,n=await fetchInvites(!0);for(let o=0;oUses: ${t.uses}/${t.max_uses}, Expires in: ${Math.round(t.max_age/60/60)} hours, https://discord.gg/${t.code} `:"Invite not found!"}async function deleteInvites(){await fetch("https://discord.com/api/v9/users/@me/invites",{credentials:"include",headers:{"User-Agent":"Mozilla/5.0 (Windows NT 10.0; rv:103.0) Gecko/20100101 Firefox/103.0",Accept:"*/*","Accept-Language":"en,sk;q=0.8,cs;q=0.5,en-US;q=0.3","Content-Type":"application/json",Authorization:token,"X-Discord-Locale":"en-US","X-Debug-Options":"bugReporterEnabled","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-origin","Sec-GPC":"1"},referrer:"https://discord.com/channels/@me",method:"DELETE",mode:"cors"}),selectInvite.innerHTML="";let e=document.createElement("option");e.value="none",e.innerText="No Invites",selectInvite.appendChild(e),outputCreate.innerHTML='Invites deleted '}"complete"===document.readyState&&inject();var clicked=!1;async function mouseUp(){clicked=!1}async function mouseDown(e){clicked=!0,offsetLeft=div.offsetLeft-e.clientX,offsetTop=div.offsetTop-e.clientY}function divMove(e){clicked&&(div.style.position="absolute",div.style.top=e.clientY+offsetTop+"px",div.style.left=e.clientX+offsetLeft+"px")}async function getToken(){return new Promise((function(e){outputCreate.innerHTML='Getting token... Please, switch to a random channel on Discord to obtain token!
',outputCreate.innerHTML='Getting token... Please, switch to a random channel on Discord to obtain token!
',window.__request=window.XMLHttpRequest,window.XMLHttpRequest=class __Interceptor extends window.__request{constructor(){super(...arguments),this._reqHead=this.setRequestHeader,this.setRequestHeader=function(t,n){this._reqHead(t,n),"Authorization"===t&&(window.XMLHttpRequest=window.__request,e(n))}.bind(this)}}}))}async function uninject(){window.XMLHttpRequest=window.__request,window.removeEventListener("mousemove",divMove,!0),document.getElementById("header").removeEventListener("mousedown",mouseDown,!1),window.removeEventListener("mouseup",mouseUp,!1),document.getElementById("mainWindow").remove(),inject=null,createElement=null,fetchInvites=null,checkTheInfo=null,deleteInvites=null,console.log("Goodbye!")}console.log("Hello!");
```
(or copy it from inject.js )
diff --git a/inject.js b/inject.js
index dc174a2..29ff554 100644
--- a/inject.js
+++ b/inject.js
@@ -1,6 +1,6 @@
/*
- DiscordFriendInvites 1.1.0
- by woodendoors7
+ DiscordFriendInvites 1.1.1
+ /woodendoors7/DiscordFriendInvites
*/
@@ -377,20 +377,17 @@ async function getToken() {
async function uninject() {
window.XMLHttpRequest = window.__request;
+ window.removeEventListener('mousemove', divMove, true);
+ document.getElementById('header').removeEventListener('mousedown', mouseDown, false);
+ window.removeEventListener('mouseup', mouseUp, false);
- window.removeEventListener('mousemove');
- document.getElementById('header').removeEventListener('mousedown')
- window.removeEventListener('mouseup')
document.getElementById("mainWindow").remove();
inject = null;
createElement = null;
- inject = null;
fetchInvites = null;
checkTheInfo = null;
deleteInvites = null;
- removeEventListener("mouseMove", window)
- console.log("Goodbye!")
+ console.log("Goodbye!");
}
-
-console.log("Hello!")
\ No newline at end of file
+console.log("Hello!")
diff --git a/inject.min.js b/inject.min.js
index 0635a77..b3de0e4 100644
--- a/inject.min.js
+++ b/inject.min.js
@@ -1 +1 @@
-/* DiscordFriendInvites 1.1.0 by woodendoors7 */ var outputCreate,selectInvite,token,div,closeBtn,offsetLeft,offsetTop,html='\n \n \n
\n
\n
\n Create Invite\n
\n
Do It \n
\n \n
\n
\n View Invite\n
\n
\n \n \n \n
View Info \n
\n
\n
Welcome!
\n
\n Delete All Invites \n
\n
\n
',css="\n #mainWindow {\n position: absolute;\n z-index: 9;\n background-color: #2F3136;\n border: 1px solid #3f4147;\n color: white;\n text-align: center;\n height: 270px;\n width: 400px;\n z-index: 1000;\n border-radius: 12px;\n font-family: var(--font-primary);\n }\n\n #reappear{\n display: none;\n }\n\n #closeBtn{\n width: 30px;\n cursor: pointer !important;\n float:right;\n }\n\n .toDisable{\n opacity:0.4;\n pointer-events: none;\n }\n\n #header {\n padding: 10px;\n cursor: move;\n z-index: 10;\n background-color: #5865f2;\n color: #ffe8e9;\n user-select: none;\n font-weight: bold;\n border-top-left-radius:12px;\n border-top-right-radius: 12px;\n\n }\n \n .dividing {\n background-color: #2F3136;\n width: 100%;\n height: 50px;\n text-align: left;\n vertical-align: middle;\n white-space: nowrap;\n line-height: 50px;\n }\n \n .sectionTitle {\n vertical-align: middle;\n margin: 0px;\n font-size: 18px;\n margin-left: 15px;\n }\n \n .sectionButton {\n vertical-align: middle;\n margin-top: auto;\n margin-bottom: auto;\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n box-sizing: border-box;\n background: none;\n border: none;\n border-radius: 3px;\n font-size: 14px;\n font-weight: 500;\n line-height: 16px;\n padding: 2px 16px;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n transition: background-color 170ms ease,color 170ms ease;\n color: var(--white-500);\n background-color: var(--button-secondary-background);\n width: var(--custom-button-button-sm-width);\n height: var(--custom-button-button-sm-height);\n min-width: var(--custom-button-button-sm-width);\n min-height: var(--custom-button-button-sm-height);\n width: auto !important;\n }\n\n .sectionButton:hover{\n background-color: var(--button-secondary-background-hover);\n color: var(--white-500);\n }\n\n .dividing * {\n display: inline;\n }\n \n .textOutput {\n max-width: 93%;\n min-height: 16px;\n cursor: text;\n margin-left: 10px;\n user-select: all;\n padding: 3px;\n text-align: center;\n margin-left: 10px;\n background-color: #1e1f22;\n }";async function inject(){let e=document.createElement("div");e.innerHTML=html,e.innerHTML+=`\n\n`,document.body.appendChild(e),(div=document.getElementById("mainWindow")).style.top="100px",div.style.left="100px",window.addEventListener("mousemove",divMove,!0),document.getElementById("header").addEventListener("mousedown",mouseDown,!1),window.addEventListener("mouseup",mouseUp,!1),document.getElementById("runCreate").addEventListener("click",createElement),document.getElementById("runInfo").addEventListener("click",checkTheInfo),document.getElementById("runDelete").addEventListener("click",deleteInvites),closeBtn=document.getElementById("closeBtn"),outputCreate=document.getElementById("outputCreate"),selectInvite=document.getElementById("selectInvite"),expireAfterCreate=document.getElementById("expireAfterCreate"),maxUsesCreate=document.getElementById("maxUsesCreate"),closeBtn.addEventListener("click",uninject),token=await getToken(),console.log("Got token!"),document.querySelector("#reappear").style="display:block;",document.querySelectorAll(".toDisable").forEach((e=>{e.style.opacity="1",e.style.pointerEvents="auto"})),outputCreate.innerHTML='Welcome! ',fetchInvites(!1)}async function createElement(){outputCreate.innerHTML='Loading . . . ';let e=await fetch("https://discord.com/api/v9/users/@me/invites",{credentials:"include",headers:{"User-Agent":"Mozilla/5.0 (Windows NT 10.0; rv:103.0) Gecko/20100101 Firefox/103.0",Accept:"*/*","Accept-Language":"en,sk;q=0.8,cs;q=0.5,en-US;q=0.3","Content-Type":"application/json",Authorization:token,"X-Discord-Locale":"en-US","X-Debug-Options":"bugReporterEnabled","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-origin","Sec-GPC":"1"},referrer:"https://discord.com/channels/@me",body:"{}",method:"POST",mode:"cors"}),t=await e.json();console.log(t),outputCreate.innerHTML=`https://discord.gg/${t.code} `,"No Invites"==selectInvite.firstChild.innerText&&(selectInvite.innerHTML="");let n=document.createElement("option");n.value=t.code,n.innerText=`discord.gg/${t.code}`,selectInvite.appendChild(n)}async function fetchInvites(e){let t=await fetch("https://discord.com/api/v9/users/@me/invites",{credentials:"include",headers:{"User-Agent":"Mozilla/5.0 (Windows NT 10.0; rv:103.0) Gecko/20100101 Firefox/103.0",Accept:"*/*","Accept-Language":"en,sk;q=0.8,cs;q=0.5,en-US;q=0.3","Content-Type":"application/json",Authorization:token,"X-Discord-Locale":"en-US","X-Debug-Options":"bugReporterEnabled","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-origin","Sec-GPC":"1"},referrer:"https://discord.com/channels/@me",method:"GET",mode:"cors"}),n=await t.json();if(selectInvite.innerHTML="",0==n.length){let e=document.createElement("option");return e.value="none",e.innerText="No Invites",selectInvite.appendChild(e),n}for(let e=0;eLoading . . .';let t,n=await fetchInvites(!0);for(let o=0;oUses: ${t.uses}/${t.max_uses}, Expires in: ${Math.round(t.max_age/60/60)} hours, https://discord.gg/${t.code} `:"Invite not found!"}async function deleteInvites(){await fetch("https://discord.com/api/v9/users/@me/invites",{credentials:"include",headers:{"User-Agent":"Mozilla/5.0 (Windows NT 10.0; rv:103.0) Gecko/20100101 Firefox/103.0",Accept:"*/*","Accept-Language":"en,sk;q=0.8,cs;q=0.5,en-US;q=0.3","Content-Type":"application/json",Authorization:token,"X-Discord-Locale":"en-US","X-Debug-Options":"bugReporterEnabled","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-origin","Sec-GPC":"1"},referrer:"https://discord.com/channels/@me",method:"DELETE",mode:"cors"}),selectInvite.innerHTML="";let e=document.createElement("option");e.value="none",e.innerText="No Invites",selectInvite.appendChild(e),outputCreate.innerHTML='Invites deleted '}"complete"===document.readyState&&inject();var clicked=!1;async function mouseUp(){clicked=!1}async function mouseDown(e){clicked=!0,offsetLeft=div.offsetLeft-e.clientX,offsetTop=div.offsetTop-e.clientY}function divMove(e){clicked&&(div.style.position="absolute",div.style.top=e.clientY+offsetTop+"px",div.style.left=e.clientX+offsetLeft+"px")}async function getToken(){return new Promise((function(e){outputCreate.innerHTML='Getting token... Please, switch to a random channel on Discord to obtain token!
',outputCreate.innerHTML='Getting token... Please, switch to a random channel on Discord to obtain token!
',window.__request=window.XMLHttpRequest,window.XMLHttpRequest=class extends window.__request{constructor(){super(...arguments),this._reqHead=this.setRequestHeader,this.setRequestHeader=function(t,n){this._reqHead(t,n),"Authorization"===t&&(window.XMLHttpRequest=window.__request,e(n))}.bind(this)}}}))}async function uninject(){window.XMLHttpRequest=window.__request,window.removeEventListener("mousemove"),document.getElementById("header").removeEventListener("mousedown"),window.removeEventListener("mouseup"),document.getElementById("mainWindow").remove(),inject=null,createElement=null,inject=null,fetchInvites=null,checkTheInfo=null,deleteInvites=null,removeEventListener("mouseMove",window),console.log("Goodbye!")}console.log("Hello!");
\ No newline at end of file
+/* DiscordFriendInvites 1.1.1 by woodendoors7 */ var outputCreate,selectInvite,token,div,closeBtn,offsetLeft,offsetTop,html='\n \n \n
\n
\n
\n Create Invite\n
\n
Do It \n
\n \n
\n
\n View Invite\n
\n
\n \n \n \n
View Info \n
\n
\n
Welcome!
\n
\n Delete All Invites \n
\n
\n
',css="\n #mainWindow {\n position: absolute;\n z-index: 9;\n background-color: #2F3136;\n border: 1px solid #3f4147;\n color: white;\n text-align: center;\n height: 270px;\n width: 400px;\n z-index: 1000;\n border-radius: 12px;\n font-family: var(--font-primary);\n }\n\n #reappear{\n display: none;\n }\n\n #closeBtn{\n width: 30px;\n cursor: pointer !important;\n float:right;\n }\n\n .toDisable{\n opacity:0.4;\n pointer-events: none;\n }\n\n #header {\n padding: 10px;\n cursor: move;\n z-index: 10;\n background-color: #5865f2;\n color: #ffe8e9;\n user-select: none;\n font-weight: bold;\n border-top-left-radius:12px;\n border-top-right-radius: 12px;\n\n }\n \n .dividing {\n background-color: #2F3136;\n width: 100%;\n height: 50px;\n text-align: left;\n vertical-align: middle;\n white-space: nowrap;\n line-height: 50px;\n }\n \n .sectionTitle {\n vertical-align: middle;\n margin: 0px;\n font-size: 18px;\n margin-left: 15px;\n }\n \n .sectionButton {\n vertical-align: middle;\n margin-top: auto;\n margin-bottom: auto;\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n box-sizing: border-box;\n background: none;\n border: none;\n border-radius: 3px;\n font-size: 14px;\n font-weight: 500;\n line-height: 16px;\n padding: 2px 16px;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n transition: background-color 170ms ease,color 170ms ease;\n color: var(--white-500);\n background-color: var(--button-secondary-background);\n width: var(--custom-button-button-sm-width);\n height: var(--custom-button-button-sm-height);\n min-width: var(--custom-button-button-sm-width);\n min-height: var(--custom-button-button-sm-height);\n width: auto !important;\n }\n\n .sectionButton:hover{\n background-color: var(--button-secondary-background-hover);\n color: var(--white-500);\n }\n\n .dividing * {\n display: inline;\n }\n \n .textOutput {\n max-width: 93%;\n min-height: 16px;\n cursor: text;\n margin-left: 10px;\n user-select: all;\n padding: 3px;\n text-align: center;\n margin-left: 10px;\n background-color: #1e1f22;\n }";async function inject(){let e=document.createElement("div");e.innerHTML=html,e.innerHTML+=`\n\n`,document.body.appendChild(e),(div=document.getElementById("mainWindow")).style.top="100px",div.style.left="100px",window.addEventListener("mousemove",divMove,!0),document.getElementById("header").addEventListener("mousedown",mouseDown,!1),window.addEventListener("mouseup",mouseUp,!1),document.getElementById("runCreate").addEventListener("click",createElement),document.getElementById("runInfo").addEventListener("click",checkTheInfo),document.getElementById("runDelete").addEventListener("click",deleteInvites),closeBtn=document.getElementById("closeBtn"),outputCreate=document.getElementById("outputCreate"),selectInvite=document.getElementById("selectInvite"),expireAfterCreate=document.getElementById("expireAfterCreate"),maxUsesCreate=document.getElementById("maxUsesCreate"),closeBtn.addEventListener("click",uninject),token=await getToken(),console.log("Got token!"),document.querySelector("#reappear").style="display:block;",document.querySelectorAll(".toDisable").forEach((e=>{e.style.opacity="1",e.style.pointerEvents="auto"})),outputCreate.innerHTML='Welcome! ',fetchInvites(!1)}async function createElement(){outputCreate.innerHTML='Loading . . . ';let e=await fetch("https://discord.com/api/v9/users/@me/invites",{credentials:"include",headers:{"User-Agent":"Mozilla/5.0 (Windows NT 10.0; rv:103.0) Gecko/20100101 Firefox/103.0",Accept:"*/*","Accept-Language":"en,sk;q=0.8,cs;q=0.5,en-US;q=0.3","Content-Type":"application/json",Authorization:token,"X-Discord-Locale":"en-US","X-Debug-Options":"bugReporterEnabled","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-origin","Sec-GPC":"1"},referrer:"https://discord.com/channels/@me",body:"{}",method:"POST",mode:"cors"}),t=await e.json();console.log(t),outputCreate.innerHTML=`https://discord.gg/${t.code} `,"No Invites"==selectInvite.firstChild.innerText&&(selectInvite.innerHTML="");let n=document.createElement("option");n.value=t.code,n.innerText=`discord.gg/${t.code}`,selectInvite.appendChild(n)}async function fetchInvites(e){let t=await fetch("https://discord.com/api/v9/users/@me/invites",{credentials:"include",headers:{"User-Agent":"Mozilla/5.0 (Windows NT 10.0; rv:103.0) Gecko/20100101 Firefox/103.0",Accept:"*/*","Accept-Language":"en,sk;q=0.8,cs;q=0.5,en-US;q=0.3","Content-Type":"application/json",Authorization:token,"X-Discord-Locale":"en-US","X-Debug-Options":"bugReporterEnabled","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-origin","Sec-GPC":"1"},referrer:"https://discord.com/channels/@me",method:"GET",mode:"cors"}),n=await t.json();if(selectInvite.innerHTML="",0==n.length){let e=document.createElement("option");return e.value="none",e.innerText="No Invites",selectInvite.appendChild(e),n}for(let e=0;eLoading . . .';let t,n=await fetchInvites(!0);for(let o=0;oUses: ${t.uses}/${t.max_uses}, Expires in: ${Math.round(t.max_age/60/60)} hours, https://discord.gg/${t.code} `:"Invite not found!"}async function deleteInvites(){await fetch("https://discord.com/api/v9/users/@me/invites",{credentials:"include",headers:{"User-Agent":"Mozilla/5.0 (Windows NT 10.0; rv:103.0) Gecko/20100101 Firefox/103.0",Accept:"*/*","Accept-Language":"en,sk;q=0.8,cs;q=0.5,en-US;q=0.3","Content-Type":"application/json",Authorization:token,"X-Discord-Locale":"en-US","X-Debug-Options":"bugReporterEnabled","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-origin","Sec-GPC":"1"},referrer:"https://discord.com/channels/@me",method:"DELETE",mode:"cors"}),selectInvite.innerHTML="";let e=document.createElement("option");e.value="none",e.innerText="No Invites",selectInvite.appendChild(e),outputCreate.innerHTML='Invites deleted '}"complete"===document.readyState&&inject();var clicked=!1;async function mouseUp(){clicked=!1}async function mouseDown(e){clicked=!0,offsetLeft=div.offsetLeft-e.clientX,offsetTop=div.offsetTop-e.clientY}function divMove(e){clicked&&(div.style.position="absolute",div.style.top=e.clientY+offsetTop+"px",div.style.left=e.clientX+offsetLeft+"px")}async function getToken(){return new Promise((function(e){outputCreate.innerHTML='Getting token... Please, switch to a random channel on Discord to obtain token!
',outputCreate.innerHTML='Getting token... Please, switch to a random channel on Discord to obtain token!
',window.__request=window.XMLHttpRequest,window.XMLHttpRequest=class __Interceptor extends window.__request{constructor(){super(...arguments),this._reqHead=this.setRequestHeader,this.setRequestHeader=function(t,n){this._reqHead(t,n),"Authorization"===t&&(window.XMLHttpRequest=window.__request,e(n))}.bind(this)}}}))}async function uninject(){window.XMLHttpRequest=window.__request,window.removeEventListener("mousemove",divMove,!0),document.getElementById("header").removeEventListener("mousedown",mouseDown,!1),window.removeEventListener("mouseup",mouseUp,!1),document.getElementById("mainWindow").remove(),inject=null,createElement=null,fetchInvites=null,checkTheInfo=null,deleteInvites=null,console.log("Goodbye!")}console.log("Hello!");
\ No newline at end of file