Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/platforms/kick/kick.constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ export const KICK_DEFAULT_SETTINGS: KickSettings = {
realVideoTimeEnabled: true,
realVideoTimeFormat12h: false,
channelSection: true,
_disableExtensionOnDashboard: false,
};
6 changes: 5 additions & 1 deletion src/platforms/kick/kick.platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ export default class KickPlatform extends Platform<KickModule, KickEvents, KickS
}

shouldStart(location: Location): boolean {
return location.hostname !== "docs.kick.com";
const blocklist = ["docs.kick.com", "dev.kick.com", "help.kick.com"];
if (document.cookie.includes("_enhancer_disable_dashboard=true")) {
Comment thread
igorovh marked this conversation as resolved.
Comment thread
igorovh marked this conversation as resolved.
blocklist.push("dashboard.kick.com");
}
return !blocklist.includes(location.hostname);
Comment thread
igorovh marked this conversation as resolved.
}
}
20 changes: 20 additions & 0 deletions src/platforms/kick/modules/settings/settings.module.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ export default class SettingsModule extends KickModule {
callback: this.loadSettings.bind(this),
key: "settings-refresh",
},
{
type: "event",
event: "kick:settings:_disableExtensionOnDashboard",
callback: (value) => {
if (value) {
document.cookie = "_enhancer_disable_dashboard=true; domain=.kick.com; path=/; max-age=315360000";
Comment thread
igorovh marked this conversation as resolved.
} else {
document.cookie = "_enhancer_disable_dashboard=; domain=.kick.com; path=/; max-age=0";
}
},
key: "_disableExtensionOnDashboard",
},
Comment thread
igorovh marked this conversation as resolved.
],
};

Expand Down Expand Up @@ -101,6 +113,14 @@ export default class SettingsModule extends KickModule {
tabIndex: tabIndexes.General,
requiresRefreshToDisable: true,
},
{
id: "_disableExtensionOnDashboard",
title: "Disable Enhancer on Dashboard",
description: "Disables loading Enhancer on dashboard page (dashboard.kick.com).",
type: "toggle",
tabIndex: tabIndexes.General,
requiresRefreshToDisable: true,
},
{
id: "chatImagesEnabled",
title: "Enable Chat Images",
Expand Down
1 change: 1 addition & 0 deletions src/types/platforms/kick/kick.settings.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export type KickSettings = {
realVideoTimeEnabled: boolean;
realVideoTimeFormat12h: boolean;
channelSection: boolean;
_disableExtensionOnDashboard: boolean;
Comment thread
igorovh marked this conversation as resolved.
};

export type KickSettingsEvents = {
Expand Down
Loading