mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 20:47:11 +03:00
fix(types): change wrong type of 'types'
This commit is contained in:
@@ -1092,7 +1092,7 @@ function createButton(baseID, title, callback, imageName, isDraggable=false): bo
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getControls(): HTMLElement | boolean {
|
function getControls(): HTMLElement | false {
|
||||||
const controlsSelectors = [
|
const controlsSelectors = [
|
||||||
// YouTube
|
// YouTube
|
||||||
".ytp-right-controls",
|
".ytp-right-controls",
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class PreviewBar {
|
|||||||
onInvidious: boolean;
|
onInvidious: boolean;
|
||||||
|
|
||||||
timestamps: number[][];
|
timestamps: number[][];
|
||||||
types: string;
|
types: string[];
|
||||||
|
|
||||||
constructor(parent: any, onMobileYouTube: boolean, onInvidious: boolean) {
|
constructor(parent: any, onMobileYouTube: boolean, onInvidious: boolean) {
|
||||||
this.container = document.createElement('ul');
|
this.container = document.createElement('ul');
|
||||||
@@ -137,7 +137,7 @@ class PreviewBar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
set(timestamps: number[][], types: string, duration: number): void {
|
set(timestamps: number[][], types: string[], duration: number): void {
|
||||||
while (this.container.firstChild) {
|
while (this.container.firstChild) {
|
||||||
this.container.removeChild(this.container.firstChild);
|
this.container.removeChild(this.container.firstChild);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ class Utils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Function that can be used to wait for a condition before returning
|
// Function that can be used to wait for a condition before returning
|
||||||
async wait(condition: () => boolean, timeout = 5000, check = 100): Promise<boolean> {
|
async wait(condition: () => HTMLElement | boolean, timeout = 5000, check = 100): Promise<HTMLElement | boolean> {
|
||||||
return await new Promise((resolve, reject) => {
|
return await new Promise((resolve, reject) => {
|
||||||
setTimeout(() => reject("TIMEOUT"), timeout);
|
setTimeout(() => reject("TIMEOUT"), timeout);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user