fuckery fuckery get out of my deprecated way 😔

This commit is contained in:
Jean Ouina 2020-06-27 00:21:36 +02:00
parent 7544f67fa2
commit 4eadc30037
3 changed files with 24 additions and 74 deletions

File diff suppressed because one or more lines are too long

View File

@ -266,28 +266,6 @@ Core.prototype.initObserver = function () {
if (node.parentElement == document.body && node.querySelector("#ace_settingsmenu")) node.id = "ace_settingsmenu_container"; if (node.parentElement == document.body && node.querySelector("#ace_settingsmenu")) node.id = "ace_settingsmenu_container";
/*
if(node.classList.contains(classNameModal)){
try{
/**
* @type {Element}
*//*
const UserProfile = Utils.getNestedProp(node, "childNodes.0.childNodes.0")
let user = BDV2.getInternalInstance(node).pendingProps.children.props.children.props.user
console.log(user)
if(UserProfile && UserProfile.childNodes.length === 2){
let header = UserProfile.childNodes[0].childNodes[0]
let children = BDV2.getInternalInstance(header).return.pendingProps.children[1]
console.log(children)
children.push(BDV2.react.createElement("p", {}, "sltsv"))
}
}catch(e){
console.error("An error occured in Badge Rendering:", e)
}
}*/
// Emoji Picker // Emoji Picker
//node.getElementsByClassName("emojiPicker-3m1S-j").length && !node.querySelector(".emojiPicker-3m1S-j").parentElement.classList.contains("animatorLeft-1EQxU0") //node.getElementsByClassName("emojiPicker-3m1S-j").length && !node.querySelector(".emojiPicker-3m1S-j").parentElement.classList.contains("animatorLeft-1EQxU0")
//if (node.classList.contains(classNameLayer2) && node.getElementsByClassName(classNameEmojiPicker).length && !node.querySelector("."+classNameEmojiPicker).parentElement.classList.contains(classNameAnimatorLeft)) quickEmoteMenu.obsCallback(node); //if (node.classList.contains(classNameLayer2) && node.getElementsByClassName(classNameEmojiPicker).length && !node.querySelector("."+classNameEmojiPicker).parentElement.classList.contains(classNameAnimatorLeft)) quickEmoteMenu.obsCallback(node);

View File

@ -30,7 +30,7 @@ export default new class DistantServer {
set cache(data){ set cache(data){
if(typeof data !== "object" || typeof this._cache !== "object")return this._cache = data if(typeof data !== "object" || typeof this._cache !== "object")return this._cache = data
return this._cache = Object.assign(this._cache, data) return this._cache = Object.assign(this._cache, data)
} }/*
async delete(){ async delete(){
BdApi.showToast("Deleting all infos about you on Lightcord Servers...", {type: "warn"}) BdApi.showToast("Deleting all infos about you on Lightcord Servers...", {type: "warn"})
@ -48,7 +48,7 @@ export default new class DistantServer {
BdApi.showToast("An error occured, couldn't delete informations. See console for more infos", {type: "error"}) BdApi.showToast("An error occured, couldn't delete informations. See console for more infos", {type: "error"})
throw new Error(`Couldn't delete all informations: ${err.stack}`) throw new Error(`Couldn't delete all informations: ${err.stack}`)
}) })
} }*/
/** /**
* Get custom badges from the user ID. * Get custom badges from the user ID.
@ -68,6 +68,7 @@ export default new class DistantServer {
if(badge.defaultUsers.includes(user))badges.push(badge) if(badge.defaultUsers.includes(user))badges.push(badge)
} }
const fetchedBadges = await new Promise((resolve) => { const fetchedBadges = await new Promise((resolve) => {
if(!settingsCookie["lightcord-5"])return resolve([])
badgesToFetch.push([user, resolve]) badgesToFetch.push([user, resolve])
setTimeout(() => { setTimeout(() => {
let users = badgesToFetch let users = badgesToFetch