Skip to content

Commit

Permalink
Disable Spotify logger; enabled by default and non dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuckyz committed Jul 3, 2024
1 parent a7253d2 commit c81af4e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ const settings = definePluginSettings({
disableNoisyLoggers: {
type: OptionType.BOOLEAN,
description: "Disable noisy loggers like the MessageActionCreators",
default: false,
restartNeeded: true
},
disableSpotifyLogger: {
type: OptionType.BOOLEAN,
description: "Disable the Spotify logger, which leaks account information and access token",
default: true,
restartNeeded: true
}
Expand All @@ -35,6 +41,7 @@ export default definePlugin({
name: "ConsoleJanitor",
description: "Disables annoying console messages/errors",
authors: [Devs.Nuckyz],
enabledByDefault: true,
settings,

NoopLogger: () => NoopLogger,
Expand Down Expand Up @@ -133,6 +140,14 @@ export default definePlugin({
match: /new \i\.\i\("RTCConnection\("\.concat.+?\)\)(?=,)/,
replace: "$self.NoopLogger()"
}
},
{
find: '("Spotify")',
predicate: () => settings.store.disableSpotifyLogger,
replacement: {
match: /new \i\.\i\("Spotify"\)/,
replace: "$self.NoopLogger()"
}
}
]
});

0 comments on commit c81af4e

Please sign in to comment.