1
0
Fork 1
mirror of https://github.com/Vendicated/Vencord.git synced 2025-01-10 09:56:24 +00:00

Merge branch 'Vendicated:main' into listenbrainz

This commit is contained in:
ConfiG 2024-12-09 12:36:59 +03:00 committed by GitHub
commit 5ddb99a890
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 16 additions and 12 deletions

View file

@ -159,7 +159,7 @@ export default definePlugin({
]
},
{
find: ".FOLDER_ITEM_GUILD_ICON_MARGIN);",
find: ".expandedFolderBackground,",
predicate: () => settings.store.sidebar,
replacement: [
// We use arguments[0] to access the isBetterFolders variable in this nested folder component (the parent exports all the props so we don't have to patch it)

View file

@ -75,10 +75,11 @@ export default definePlugin({
patches: [{
find: "renderConnectionStatus(){",
replacement: {
match: /(?<=renderConnectionStatus\(\)\{.+\.channel,children:)\i/,
match: /(?<=renderConnectionStatus\(\)\{.+\.channel,children:)\i(?=\})/,
replace: "[$&, $self.renderTimer(this.props.channel.id)]"
}
}],
renderTimer(channelId: string) {
return <ErrorBoundary noop>
<this.Timer channelId={channelId} />

View file

@ -16,20 +16,23 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { Settings } from "@api/Settings";
import { getUserSettingLazy } from "@api/UserSettings";
import { Devs } from "@utils/constants";
import definePlugin from "@utils/types";
const DisableStreamPreviews = getUserSettingLazy<boolean>("voiceAndVideo", "disableStreamPreviews")!;
// @TODO: Delete this plugin in the future
export default definePlugin({
name: "NoScreensharePreview",
description: "Disables screenshare previews from being sent.",
authors: [Devs.Nuckyz],
patches: [
{
find: '"ApplicationStreamPreviewUploadManager"',
replacement: {
match: /await \i\.\i\.(makeChunkedRequest\(|post\(\{url:)\i\.\i\.STREAM_PREVIEW.+?\}\)/g,
replace: "0"
start() {
if (!DisableStreamPreviews.getSetting()) {
DisableStreamPreviews.updateSetting(true);
}
Settings.plugins.NoScreensharePreview.enabled = false;
}
]
});

View file

@ -164,8 +164,8 @@ export default definePlugin({
find: 'getElementById("slate-toolbar"',
predicate: () => settings.store.addBack,
replacement: {
match: /(?<=handleContextMenu\(\i\)\{.{0,200}isPlatformEmbedded)\?/,
replace: "||true?"
match: /(?<=handleContextMenu\(\i\)\{.{0,200}isPlatformEmbedded)\)/,
replace: "||true)"
}
},
{