schmelczer-dev/src/index.ts
2020-08-30 14:20:49 +02:00

26 lines
574 B
TypeScript

import './static/no-change/favicon.ico';
import './static/no-change/og-image.jpg';
import './styles.scss';
import { create } from './portfolio';
const initialize = () => {
create();
addSupportForTabNavigation();
removeUnnecessaryOutlines();
};
const addSupportForTabNavigation = () =>
(document.onkeydown = e => {
if (e.key === ' ') {
(document.activeElement as HTMLElement)?.click();
e.preventDefault();
}
});
const removeUnnecessaryOutlines = () =>
(document.onclick = e => {
(e.target as HTMLElement)?.blur();
});
initialize();