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,
|
||||
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)
|
||||
|
|
|
@ -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} />
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
]
|
||||
});
|
||||
|
|
|
@ -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)"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue