Skip to content

Commit 3ec5333

Browse files
committed
Unnecessary AbortController
1 parent ce53f69 commit 3ec5333

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

injected/src/features/duckplayer/video-overlay.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,6 @@ export class VideoOverlay {
249249
this.messages.sendPixel(new Pixel({ name: 'overlay' }));
250250

251251
this.sideEffects.add(`appending ${DDGVideoOverlayMobile.CUSTOM_TAG_NAME} to the page`, () => {
252-
const controller = new AbortController();
253252
const elem = /** @type {DDGVideoOverlayMobile} */ (document.createElement(DDGVideoOverlayMobile.CUSTOM_TAG_NAME));
254253
elem.testMode = this.environment.isTestMode();
255254
elem.text = mobileStrings(this.environment.strings);
@@ -264,8 +263,6 @@ export class VideoOverlay {
264263

265264
return () => {
266265
document.querySelector(DDGVideoOverlayMobile.CUSTOM_TAG_NAME)?.remove();
267-
268-
controller.abort();
269266
};
270267
});
271268
}
@@ -281,7 +278,6 @@ export class VideoOverlay {
281278
this.sideEffects.add(
282279
`appending ${DDGVideoDrawerMobile.CUSTOM_TAG_NAME} and ${DDGVideoThumbnailOverlay.CUSTOM_TAG_NAME} to the page`,
283280
() => {
284-
const controller = new AbortController();
285281
const thumbnailOverlay = /** @type {DDGVideoThumbnailOverlay} */ (
286282
document.createElement(DDGVideoThumbnailOverlay.CUSTOM_TAG_NAME)
287283
);
@@ -315,8 +311,6 @@ export class VideoOverlay {
315311
drawer?.onAnimationEnd(() => {
316312
document.querySelector(DDGVideoDrawerMobile.CUSTOM_TAG_NAME)?.remove();
317313
});
318-
319-
controller.abort();
320314
};
321315
},
322316
);
@@ -330,7 +324,6 @@ export class VideoOverlay {
330324
this.messages.sendPixel(new Pixel({ name: 'overlay' }));
331325

332326
this.sideEffects.add(`appending ${DDGVideoOverlay.CUSTOM_TAG_NAME} to the page`, () => {
333-
const controller = new AbortController();
334327
const elem = new DDGVideoOverlay({
335328
environment: this.environment,
336329
params,
@@ -341,8 +334,6 @@ export class VideoOverlay {
341334

342335
return () => {
343336
document.querySelector(DDGVideoOverlay.CUSTOM_TAG_NAME)?.remove();
344-
345-
controller.abort();
346337
};
347338
});
348339
}

0 commit comments

Comments
 (0)