Tweak code

This commit is contained in:
Pig Fang 2019-11-29 09:27:07 +08:00
parent aada1148fb
commit 92282daa9e
3 changed files with 2 additions and 4 deletions

View File

@ -9,6 +9,5 @@ import './element'
import './logout'
window.addEventListener('load', () => {
// @ts-ignore
$('[data-toggle="tooltip"]').tooltip()
})

View File

@ -1,4 +1,4 @@
// KEEP THIS FILE DEPENDENCIES FREE!
// KEEP THIS FILE DEPENDENCY-FREE!
const init: RequestInit = {
credentials: 'same-origin',

View File

@ -1,5 +1,4 @@
const chooser: HTMLInputElement | null =
document.querySelector('#language-chooser')
const chooser = document.querySelector<HTMLInputElement>('#language-chooser')
if (chooser) {
chooser.addEventListener('change', () => {
window.location.href = `?lang=${chooser.value}`