mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 12:37:05 +03:00
chore(types): even more types
This commit is contained in:
@@ -31,7 +31,7 @@ export interface SkipNoticeState {
|
|||||||
noticeTitle: string;
|
noticeTitle: string;
|
||||||
|
|
||||||
messages: string[];
|
messages: string[];
|
||||||
messageOnClick: (event: React.MouseEvent) => any;
|
messageOnClick: (event: React.MouseEvent) => unknown;
|
||||||
|
|
||||||
countdownTime: number;
|
countdownTime: number;
|
||||||
maxCountdownTime: () => number;
|
maxCountdownTime: () => number;
|
||||||
@@ -56,7 +56,7 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
|
|||||||
amountOfPreviousNotices: number;
|
amountOfPreviousNotices: number;
|
||||||
audio: HTMLAudioElement;
|
audio: HTMLAudioElement;
|
||||||
|
|
||||||
idSuffix: any;
|
idSuffix: string;
|
||||||
|
|
||||||
noticeRef: React.MutableRefObject<NoticeComponent>;
|
noticeRef: React.MutableRefObject<NoticeComponent>;
|
||||||
categoryOptionRef: React.RefObject<HTMLSelectElement>;
|
categoryOptionRef: React.RefObject<HTMLSelectElement>;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export interface SubmissionNoticeProps {
|
|||||||
// Contains functions and variables from the content script needed by the skip notice
|
// Contains functions and variables from the content script needed by the skip notice
|
||||||
contentContainer: ContentContainer;
|
contentContainer: ContentContainer;
|
||||||
|
|
||||||
callback: () => any;
|
callback: () => unknown;
|
||||||
|
|
||||||
closeListener: () => void
|
closeListener: () => void
|
||||||
}
|
}
|
||||||
@@ -25,7 +25,7 @@ class SubmissionNoticeComponent extends React.Component<SubmissionNoticeProps, S
|
|||||||
// Contains functions and variables from the content script needed by the skip notice
|
// Contains functions and variables from the content script needed by the skip notice
|
||||||
contentContainer: ContentContainer;
|
contentContainer: ContentContainer;
|
||||||
|
|
||||||
callback: () => any;
|
callback: () => unknown;
|
||||||
|
|
||||||
noticeRef: React.MutableRefObject<NoticeComponent>;
|
noticeRef: React.MutableRefObject<NoticeComponent>;
|
||||||
timeEditRefs: React.RefObject<SponsorTimeEditComponent>[];
|
timeEditRefs: React.RefObject<SponsorTimeEditComponent>[];
|
||||||
|
|||||||
@@ -1456,7 +1456,7 @@ function submitSponsorTimes() {
|
|||||||
|
|
||||||
//send the message to the background js
|
//send the message to the background js
|
||||||
//called after all the checks have been made that it's okay to do so
|
//called after all the checks have been made that it's okay to do so
|
||||||
async function sendSubmitMessage(){
|
async function sendSubmitMessage(): Promise<void> {
|
||||||
//add loading animation
|
//add loading animation
|
||||||
(<HTMLImageElement> document.getElementById("submitImage")).src = chrome.extension.getURL("icons/PlayerUploadIconSponsorBlocker256px.png");
|
(<HTMLImageElement> document.getElementById("submitImage")).src = chrome.extension.getURL("icons/PlayerUploadIconSponsorBlocker256px.png");
|
||||||
document.getElementById("submitButton").style.animation = "rotate 1s 0s infinite";
|
document.getElementById("submitButton").style.animation = "rotate 1s 0s infinite";
|
||||||
|
|||||||
@@ -2,18 +2,19 @@ import * as React from "react";
|
|||||||
import * as ReactDOM from "react-dom";
|
import * as ReactDOM from "react-dom";
|
||||||
|
|
||||||
import SubmissionNoticeComponent from "../components/SubmissionNoticeComponent";
|
import SubmissionNoticeComponent from "../components/SubmissionNoticeComponent";
|
||||||
|
import { ContentContainer } from "../types";
|
||||||
|
|
||||||
class SubmissionNotice {
|
class SubmissionNotice {
|
||||||
// Contains functions and variables from the content script needed by the skip notice
|
// Contains functions and variables from the content script needed by the skip notice
|
||||||
contentContainer: () => any;
|
contentContainer: () => unknown;
|
||||||
|
|
||||||
callback: () => any;
|
callback: () => unknown;
|
||||||
|
|
||||||
noticeRef: React.MutableRefObject<SubmissionNoticeComponent>;
|
noticeRef: React.MutableRefObject<SubmissionNoticeComponent>;
|
||||||
|
|
||||||
noticeElement: HTMLDivElement;
|
noticeElement: HTMLDivElement;
|
||||||
|
|
||||||
constructor(contentContainer: () => any, callback: () => any) {
|
constructor(contentContainer: ContentContainer, callback: () => unknown) {
|
||||||
this.noticeRef = React.createRef();
|
this.noticeRef = React.createRef();
|
||||||
|
|
||||||
this.contentContainer = contentContainer;
|
this.contentContainer = contentContainer;
|
||||||
|
|||||||
Reference in New Issue
Block a user