Feature/#48 migrate to typescript #151
|
@ -8,7 +8,7 @@ const PLAYER_ID = 'player';
|
||||||
export function init(): void {
|
export function init(): void {
|
||||||
getGlobalConfiguration().getProperty(SETTINGS_playerAutoplayAfterScreenshot, value => {
|
getGlobalConfiguration().getProperty(SETTINGS_playerAutoplayAfterScreenshot, value => {
|
||||||
if (value) {
|
if (value) {
|
||||||
core.registerScript(node => {
|
core.registerScript((node: Node) => {
|
||||||
let element = node as HTMLElement;
|
let element = node as HTMLElement;
|
||||||
if (helper.assigned(element) && element.id === SCREENSHOT_TOOLTIP_ID) {
|
if (helper.assigned(element) && element.id === SCREENSHOT_TOOLTIP_ID) {
|
||||||
observeScreenshotTooltip(element);
|
observeScreenshotTooltip(element);
|
||||||
|
|
|
@ -5,7 +5,7 @@ import * as color from '../utils/colors';
|
||||||
export function init(): void {
|
export function init(): void {
|
||||||
getGlobalConfiguration().getProperty(SETTINGS_requestBeautifyPage, value => {
|
getGlobalConfiguration().getProperty(SETTINGS_requestBeautifyPage, value => {
|
||||||
if (value) {
|
if (value) {
|
||||||
core.registerScript(node => {
|
core.registerScript((node: Node) => {
|
||||||
// run the scripts
|
// run the scripts
|
||||||
if (node instanceof HTMLElement) {
|
if (node instanceof HTMLElement) {
|
||||||
changeFollowedStarColor(node);
|
changeFollowedStarColor(node);
|
||||||
|
|
|
@ -18,7 +18,7 @@ export function init(): void {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
core.registerScript(node => {
|
core.registerScript((node: Node) => {
|
||||||
if (node instanceof Element) {
|
if (node instanceof Element) {
|
||||||
disableFunc(node);
|
disableFunc(node);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ export function init(): void {
|
||||||
checkRunColorOptimization(document.documentElement);
|
checkRunColorOptimization(document.documentElement);
|
||||||
}, ".*");
|
}, ".*");
|
||||||
|
|
||||||
core.registerScript(node => {
|
core.registerScript((node: Node) => {
|
||||||
if (node instanceof Element) {
|
if (node instanceof Element) {
|
||||||
checkRunColorOptimization(node);
|
checkRunColorOptimization(node);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue