type signatures
This commit is contained in:
parent
97660781a7
commit
fe338b2f3f
2 changed files with 4 additions and 5 deletions
|
@ -174,7 +174,7 @@ function sortFiltersUses(e: Event) {
|
||||||
|
|
||||||
|
|
||||||
function setup() {
|
function setup() {
|
||||||
function inputs(id: string) {
|
function inputs(id: string): Boxes {
|
||||||
let iter = document.getElementById(id)!.getElementsByTagName('input');
|
let iter = document.getElementById(id)!.getElementsByTagName('input');
|
||||||
return new Set(Array.from(iter));
|
return new Set(Array.from(iter));
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ let mainlink: HTMLAnchorElement;
|
||||||
let altButtons: HTMLInputElement[];
|
let altButtons: HTMLInputElement[];
|
||||||
let skipAll: HTMLInputElement;
|
let skipAll: HTMLInputElement;
|
||||||
|
|
||||||
let opened = new Set;
|
let opened: Set<string> = new Set;
|
||||||
|
|
||||||
function openCW(id: string | null, caption: HTMLElement | null,
|
function openCW(id: string | null, caption: HTMLElement | null,
|
||||||
focusLink = false) {
|
focusLink = false) {
|
||||||
|
@ -51,8 +51,7 @@ function setImage(id: string | null,
|
||||||
mainlink.href = href;
|
mainlink.href = href;
|
||||||
}
|
}
|
||||||
|
|
||||||
function activateButton(button: HTMLInputElement,
|
function activateButton(button: HTMLInputElement, doPush = true): void {
|
||||||
doPush = true) {
|
|
||||||
setImage(button.id, button.value,
|
setImage(button.id, button.value,
|
||||||
button.dataset.link!,
|
button.dataset.link!,
|
||||||
button.dataset.warning!);
|
button.dataset.warning!);
|
||||||
|
@ -60,7 +59,7 @@ function activateButton(button: HTMLInputElement,
|
||||||
if (doPush) history.pushState(null, '', '#' + button.id);
|
if (doPush) history.pushState(null, '', '#' + button.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
function useFragment(firstLoad = false) {
|
function useFragment(firstLoad = false): void {
|
||||||
let button = altButtons[0];
|
let button = altButtons[0];
|
||||||
|
|
||||||
let frag = decodeURIComponent(location.hash).replace(/^#/, '');
|
let frag = decodeURIComponent(location.hash).replace(/^#/, '');
|
||||||
|
|
Loading…
Reference in a new issue