stuff
This commit is contained in:
parent
ba58d12f6d
commit
23b535e67f
|
@ -1195,18 +1195,18 @@ module.exports = (_ => {
|
|||
e.node.addEventListener("mousedown", event => {
|
||||
if (event.which != 1) return;
|
||||
BDFDB.ListenerUtils.stopEvent(event);
|
||||
|
||||
|
||||
let vanishObserver;
|
||||
|
||||
let imgRects = BDFDB.DOMUtils.getRects(e.node.firstElementChild);
|
||||
|
||||
|
||||
let lens = BDFDB.DOMUtils.create(`<div class="${BDFDB.disCN._imageutilitieslense}" style="border-radius: 50% !important; pointer-events: none !important; z-index: 10000 !important; width: ${this.settings.zoomSettings.lensSize}px !important; height: ${this.settings.zoomSettings.lensSize}px !important; position: fixed !important;"><div style="position: absolute !important; top: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important;"><${e.node.firstElementChild.tagName} src="${e.instance.props.src}" style="width: ${imgRects.width * this.settings.zoomSettings.zoomLevel}px; height: ${imgRects.height * this.settings.zoomSettings.zoomLevel}px; position: fixed !important;${this.settings.zoomSettings.pixelMode ? " image-rendering: pixelated !important;" : ""}"${e.node.firstElementChild.tagName == "VIDEO" ? " loop autoplay" : ""}></${e.node.firstElementChild.tagName}></div></div>`);
|
||||
let pane = lens.firstElementChild.firstElementChild;
|
||||
let backdrop = BDFDB.DOMUtils.create(`<div class="${BDFDB.disCN._imageutilitieslensebackdrop}" style="background: rgba(0, 0, 0, 0.3) !important; position: absolute !important; top: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important; pointer-events: none !important; z-index: 8000 !important;"></div>`);
|
||||
let appMount = document.querySelector(BDFDB.dotCN.appmount);
|
||||
appMount.appendChild(lens);
|
||||
appMount.appendChild(backdrop);
|
||||
|
||||
|
||||
let lensRects = BDFDB.DOMUtils.getRects(lens);
|
||||
|
||||
let halfW = lensRects.width / 2, halfH = lensRects.height / 2;
|
||||
|
@ -1230,7 +1230,7 @@ module.exports = (_ => {
|
|||
lens.update();
|
||||
|
||||
e.node.style.setProperty("pointer-events", "none", "important");
|
||||
|
||||
|
||||
let dragging = event2 => {
|
||||
event = event2;
|
||||
lens.update();
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @name RemoveBlockedUsers
|
||||
* @author DevilBro
|
||||
* @authorId 278543574059057154
|
||||
* @version 1.5.1
|
||||
* @version 1.5.2
|
||||
* @description Removes blocked Messages/Users
|
||||
* @invite Jx3TjNS
|
||||
* @donate https://www.paypal.me/MircoWittrien
|
||||
|
@ -17,7 +17,7 @@ module.exports = (_ => {
|
|||
"info": {
|
||||
"name": "RemoveBlockedUsers",
|
||||
"author": "DevilBro",
|
||||
"version": "1.5.1",
|
||||
"version": "1.5.2",
|
||||
"description": "Removes blocked Messages/Users"
|
||||
}
|
||||
};
|
||||
|
@ -409,30 +409,25 @@ module.exports = (_ => {
|
|||
}
|
||||
for (let i in newRows) if (newRows[i] && newRows[i].type == "GROUP" && newRows[i].count <= 0) newRows[i] = undefined;
|
||||
const removeEmptyWithin = (array, filter) => {
|
||||
let reversed = [].concat(array).reverse();
|
||||
let prefixLength = 0, suffixLength = 0;
|
||||
for (let i in array) if (array[i] !== undefined) {
|
||||
prefixLength = parseInt(i);
|
||||
break;
|
||||
}
|
||||
let reversed = [].concat(array).reverse(), suffixLength = 0;
|
||||
for (let i in reversed) if (reversed[i] !== undefined) {
|
||||
suffixLength = parseInt(i);
|
||||
break;
|
||||
}
|
||||
return [].concat(new Array(prefixLength), array.filter(filter), new Array(suffixLength))
|
||||
return [].concat(array.filter(filter), new Array(suffixLength))
|
||||
};
|
||||
channelMembers.props.rows = removeEmptyWithin(newRows, n => n);
|
||||
channelMembers.props.groups = removeEmptyWithin(newGroups, g => g && g.count > 0);
|
||||
}
|
||||
}
|
||||
|
||||
processPrivateChannelRecipients (e) {
|
||||
if (this.settings.places.voiceChat && e.instance.props.channel && e.instance.props.channel.isGroupDM()) e.instance.props.channel = new BDFDB.DiscordObjects.Channel(Object.assign({}, e.instance.props.channel, {rawRecipients: e.instance.props.channel.rawRecipients.filter(n => !n || !BDFDB.LibraryModules.RelationshipStore.isBlocked(n.id)), recipients: e.instance.props.channel.recipients.filter(id => !id || !BDFDB.LibraryModules.RelationshipStore.isBlocked(id))}));
|
||||
}
|
||||
|
||||
processMemberListItem (e) {
|
||||
if (this.settings.places.memberList && e.instance.props.user && BDFDB.LibraryModules.RelationshipStore.isBlocked(e.instance.props.user.id)) return null;
|
||||
}
|
||||
|
||||
processPrivateChannelRecipients (e) {
|
||||
if (this.settings.places.voiceChat && e.instance.props.channel && e.instance.props.channel.isGroupDM()) e.instance.props.channel = new BDFDB.DiscordObjects.Channel(Object.assign({}, e.instance.props.channel, {rawRecipients: e.instance.props.channel.rawRecipients.filter(n => !n || !BDFDB.LibraryModules.RelationshipStore.isBlocked(n.id)), recipients: e.instance.props.channel.recipients.filter(id => !id || !BDFDB.LibraryModules.RelationshipStore.isBlocked(id))}));
|
||||
}
|
||||
|
||||
processNowPlayingItem (e) {
|
||||
if (this.settings.places.activity) {
|
||||
|
|
|
@ -698,7 +698,7 @@ module.exports = (_ => {
|
|||
let ids = BDFDB.LibraryModules.FolderStore.guildFolders.filter(n => n.folderId).map(n => n.guildIds).flat(10);
|
||||
args[2] = args[2].filter(id => !ids.includes(id));
|
||||
return topIsVisible(...args) || BDFDB.LibraryModules.UnreadGuildUtils.getMentionCount(args[0]) == 0;
|
||||
}, "Error in isVisible of Top Bar in Guild List!");
|
||||
}, "Error in isVisible of Top Bar in Guild List!", this);
|
||||
}
|
||||
let bottomBar = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.guildswrapperunreadmentionsbarbottom]]});
|
||||
if (bottomBar) {
|
||||
|
@ -707,7 +707,7 @@ module.exports = (_ => {
|
|||
let ids = BDFDB.LibraryModules.FolderStore.guildFolders.filter(n => n.folderId).map(n => n.guildIds).flat(10);
|
||||
args[2] = args[2].filter(id => !ids.includes(id));
|
||||
return bottomIsVisible(...args) || BDFDB.LibraryModules.UnreadGuildUtils.getMentionCount(args[0]) == 0;
|
||||
}, "Error in isVisible of Bottom Bar in Guild List!");
|
||||
}, "Error in isVisible of Bottom Bar in Guild List!", this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue