README for first build
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
// * rcb@beco.cc *
|
||||
// *************************************************************************
|
||||
|
||||
import { toOrigin } from './format';
|
||||
import { toOrigin } from './format.ts';
|
||||
|
||||
const CONFIG_KEY = 'config';
|
||||
const STATE_KEY = 'state';
|
||||
|
||||
@@ -31,10 +31,10 @@ import {
|
||||
loadState,
|
||||
matchesSite,
|
||||
saveState,
|
||||
} from './config';
|
||||
import type { Config } from './config';
|
||||
import { EVENT_RESULT, FORM, LOGOUT } from './portal';
|
||||
import type { FillRequest, FillResult } from './portal';
|
||||
} from './config.ts';
|
||||
import type { Config } from './config.ts';
|
||||
import { EVENT_RESULT, FORM, LOGOUT } from './portal.ts';
|
||||
import type { FillRequest, FillResult } from './portal.ts';
|
||||
|
||||
const FORM_WAIT_MS = 10000;
|
||||
const NOTICE_ID = 'logsdu-notice';
|
||||
|
||||
@@ -84,7 +84,7 @@ export function isCompleteCpf(value: string): boolean {
|
||||
|
||||
/**
|
||||
* Origin of a user-typed site address, or null if it cannot be parsed.
|
||||
* Accepts input without a scheme ("saladigital.example.com") by assuming
|
||||
* Accepts input without a scheme ("portal.example.br") by assuming
|
||||
* https, which is what someone pasting an address from the URL bar expects.
|
||||
*/
|
||||
export function toOrigin(value: string): string | null {
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
// before that handler exists would trigger a plain browser form POST without
|
||||
// the CSRF header, which fails.
|
||||
|
||||
import { EVENT_RESULT, FIELDS, FORM, SUBMIT } from './portal';
|
||||
import type { FillRequest, FillResult } from './portal';
|
||||
import { EVENT_RESULT, FIELDS, FORM, SUBMIT } from './portal.ts';
|
||||
import type { FillRequest, FillResult } from './portal.ts';
|
||||
|
||||
const POLL_INTERVAL_MS = 100;
|
||||
const POLL_TIMEOUT_MS = 15000;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
// * rcb@beco.cc *
|
||||
// *************************************************************************
|
||||
|
||||
import { EMPTY_CONFIG, loadConfig, resetState, saveConfig } from './config';
|
||||
import { EMPTY_CONFIG, loadConfig, resetState, saveConfig } from './config.ts';
|
||||
import {
|
||||
formatCpf,
|
||||
formatDate,
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
isCompleteDate,
|
||||
isCompleteRa,
|
||||
toOrigin,
|
||||
} from './format';
|
||||
} from './format.ts';
|
||||
|
||||
function el<T extends HTMLElement>(id: string): T {
|
||||
const found = document.getElementById(id);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// the automatic submit is switched off, rate limited, or suppressed after a
|
||||
// logout.
|
||||
|
||||
import { isConfigured, loadConfig, matchesSite } from './config';
|
||||
import { isConfigured, loadConfig, matchesSite } from './config.ts';
|
||||
|
||||
const state = document.getElementById('state') as HTMLParagraphElement;
|
||||
const detail = document.getElementById('detail') as HTMLParagraphElement;
|
||||
|
||||
Reference in New Issue
Block a user