|
@@ -1,6 +1,6 @@
|
|
|
import { scriptInfo, triesInterval, triesLimit } from "../constants";
|
|
|
import { getFeatures } from "../config";
|
|
|
-import { addGlobalStyle, error, insertAfter, log, siteEvents } from "../utils";
|
|
|
+import { addGlobalStyle, error, getEvtData, insertAfter, log, siteEvents } from "../utils";
|
|
|
import type { FeatureConfig } from "../types";
|
|
|
import { openMenu } from "./menu/menu_old";
|
|
|
import "./layout.css";
|
|
@@ -80,7 +80,7 @@ export function setVolSliderStep() {
|
|
|
// TODO: account for the fact initially the elements might not exist, if the site was not opened directly with a video playing or via the /watch path
|
|
|
export function initQueueButtons() {
|
|
|
siteEvents.on("queueChanged", (evt) => {
|
|
|
- for(const queueItm of ((evt.data as HTMLElement).childNodes as NodeListOf<HTMLElement>)) {
|
|
|
+ for(const queueItm of getEvtData<HTMLElement>(evt).childNodes as NodeListOf<HTMLElement>) {
|
|
|
if(!queueItm.classList.contains("bytm-has-queue-btns"))
|
|
|
addQueueButtons(queueItm);
|
|
|
}
|