chore: remove the deprecated "fix CC slowness" feature
This feature was introduced to work around a bug in the CC which
introduced a lot of slowness. It was deprecated in 069287e because the
issue was fixed upstream.
Thus, this commit fully removes the code related to this feature.
Change-Id: I46df3ef143a97f7274d10a7a3194a952dc37bee9
diff --git a/src/features/fixCCSlowness/fixCCSlowness.feature.ts b/src/features/fixCCSlowness/fixCCSlowness.feature.ts
deleted file mode 100644
index ef5ed2e..0000000
--- a/src/features/fixCCSlowness/fixCCSlowness.feature.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import Feature from '../../common/architecture/features/Feature';
-import { ConcreteScript } from '../../common/architecture/scripts/Script';
-import { OptionCodename } from '../../common/options/optionsPrototype';
-import RemoveUserAbuseEventsFromDataStartupScript from './scripts/removeUserAbuseEventsFromDataStartup.script';
-
-// This feature also has an associated response modifier.
-
-/**
- * @deprecated This feature has been deprecated. Its code will soon be removed
- * once we're sure the feature won't come back.
- */
-export default class FixCCSlownessFeature extends Feature {
- public readonly scripts: ConcreteScript[] = [
- RemoveUserAbuseEventsFromDataStartupScript,
- ];
-
- readonly codename = 'fixCCSlowness';
- readonly relatedOptions: OptionCodename[] = ['fixpekb269560789'];
-}
diff --git a/src/features/fixCCSlowness/scripts/removeUserAbuseEventsFromDataStartup.script.ts b/src/features/fixCCSlowness/scripts/removeUserAbuseEventsFromDataStartup.script.ts
deleted file mode 100644
index 7618b78..0000000
--- a/src/features/fixCCSlowness/scripts/removeUserAbuseEventsFromDataStartup.script.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-import DependenciesProviderSingleton, {
- OptionsProviderDependency,
- StartupDataStorageDependency,
-} from '../../../common/architecture/dependenciesProvider/DependenciesProvider';
-import Script, {
- ScriptEnvironment,
- ScriptPage,
- ScriptRunPhase,
-} from '../../../common/architecture/scripts/Script';
-
-export default class RemoveUserAbuseEventsFromDataStartupScript extends Script {
- page = ScriptPage.CommunityConsole;
- environment = ScriptEnvironment.ContentScript;
- runPhase = ScriptRunPhase.Start;
-
- async execute() {
- const dependenciesProvider = DependenciesProviderSingleton.getInstance();
- const optionsProvider = dependenciesProvider.getDependency(
- OptionsProviderDependency,
- );
- if (optionsProvider.isEnabled('fixpekb269560789')) {
- const startupDataStorage = dependenciesProvider.getDependency(
- StartupDataStorageDependency,
- );
- startupDataStorage.enqueueModification((startupDataModel) => {
- if (startupDataModel.data[1]?.[1]?.[8]?.[7]) {
- delete startupDataModel.data[1]?.[1]?.[8]?.[7];
- }
- });
- }
- }
-}
diff --git a/src/xhrInterceptor/responseModifiers/removeUserAbuseEventsInViewForum.js b/src/xhrInterceptor/responseModifiers/removeUserAbuseEventsInViewForum.js
deleted file mode 100644
index 9d4e713..0000000
--- a/src/xhrInterceptor/responseModifiers/removeUserAbuseEventsInViewForum.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * @deprecated The feature behind this response modifier has been deprecated.
- * This code will soon be removed once we're sure the feature won't come back.
- */
-const removeUserAbuseEventsInViewForum = {
- urlRegex: /api\/ViewForum/i,
- featureGated: true,
- features: ['fixpekb269560789'],
- isEnabled(options) {
- return options['fixpekb269560789'];
- },
- async interceptor(_, response) {
- if (response?.[1]?.[6]?.[8]?.[7]) {
- delete response[1][6][8][7];
- }
- return response;
- },
-};
-
-export default removeUserAbuseEventsInViewForum;
diff --git a/src/xhrInterceptor/responseModifiers/removeUserAbuseEventsInViewThread.js b/src/xhrInterceptor/responseModifiers/removeUserAbuseEventsInViewThread.js
deleted file mode 100644
index 37ad79b..0000000
--- a/src/xhrInterceptor/responseModifiers/removeUserAbuseEventsInViewThread.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * @deprecated The feature behind this response modifier has been deprecated.
- * This code will soon be removed once we're sure the feature won't come back.
- */
-const removeUserAbuseEventsInViewThread = {
- urlRegex: /api\/ViewThread/i,
- featureGated: true,
- features: ['fixpekb269560789'],
- isEnabled(options) {
- return options['fixpekb269560789'];
- },
- async interceptor(_, response) {
- if (response?.[1]?.[13]?.[8]?.[7]) {
- delete response[1][13][8][7];
- }
- return response;
- },
-};
-
-export default removeUserAbuseEventsInViewThread;