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:
commit
5ddb99a890
4 changed files with 16 additions and 12 deletions
|
@ -159,7 +159,7 @@ export default definePlugin({
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
find: ".FOLDER_ITEM_GUILD_ICON_MARGIN);",
|
find: ".expandedFolderBackground,",
|
||||||
predicate: () => settings.store.sidebar,
|
predicate: () => settings.store.sidebar,
|
||||||
replacement: [
|
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)
|
// 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)
|
||||||
|
|
|
@ -75,10 +75,11 @@ export default definePlugin({
|
||||||
patches: [{
|
patches: [{
|
||||||
find: "renderConnectionStatus(){",
|
find: "renderConnectionStatus(){",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(?<=renderConnectionStatus\(\)\{.+\.channel,children:)\i/,
|
match: /(?<=renderConnectionStatus\(\)\{.+\.channel,children:)\i(?=\})/,
|
||||||
replace: "[$&, $self.renderTimer(this.props.channel.id)]"
|
replace: "[$&, $self.renderTimer(this.props.channel.id)]"
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
|
|
||||||
renderTimer(channelId: string) {
|
renderTimer(channelId: string) {
|
||||||
return <ErrorBoundary noop>
|
return <ErrorBoundary noop>
|
||||||
<this.Timer channelId={channelId} />
|
<this.Timer channelId={channelId} />
|
||||||
|
|
|
@ -16,20 +16,23 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* 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 { Devs } from "@utils/constants";
|
||||||
import definePlugin from "@utils/types";
|
import definePlugin from "@utils/types";
|
||||||
|
|
||||||
|
const DisableStreamPreviews = getUserSettingLazy<boolean>("voiceAndVideo", "disableStreamPreviews")!;
|
||||||
|
|
||||||
|
// @TODO: Delete this plugin in the future
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "NoScreensharePreview",
|
name: "NoScreensharePreview",
|
||||||
description: "Disables screenshare previews from being sent.",
|
description: "Disables screenshare previews from being sent.",
|
||||||
authors: [Devs.Nuckyz],
|
authors: [Devs.Nuckyz],
|
||||||
patches: [
|
start() {
|
||||||
{
|
if (!DisableStreamPreviews.getSetting()) {
|
||||||
find: '"ApplicationStreamPreviewUploadManager"',
|
DisableStreamPreviews.updateSetting(true);
|
||||||
replacement: {
|
|
||||||
match: /await \i\.\i\.(makeChunkedRequest\(|post\(\{url:)\i\.\i\.STREAM_PREVIEW.+?\}\)/g,
|
|
||||||
replace: "0"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
|
||||||
|
Settings.plugins.NoScreensharePreview.enabled = false;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -164,8 +164,8 @@ export default definePlugin({
|
||||||
find: 'getElementById("slate-toolbar"',
|
find: 'getElementById("slate-toolbar"',
|
||||||
predicate: () => settings.store.addBack,
|
predicate: () => settings.store.addBack,
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(?<=handleContextMenu\(\i\)\{.{0,200}isPlatformEmbedded)\?/,
|
match: /(?<=handleContextMenu\(\i\)\{.{0,200}isPlatformEmbedded)\)/,
|
||||||
replace: "||true?"
|
replace: "||true)"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue