This commit is contained in:
Edward Shen 2022-01-15 23:59:39 -08:00
parent 0dbc5fb44e
commit faac1936a9
Signed by: edward
GPG key ID: 19182661E818369F
2 changed files with 3 additions and 2 deletions

1
web/src/main.d.ts vendored Normal file
View file

@ -0,0 +1 @@
declare var hljs;

View file

@ -54,7 +54,7 @@ function loadFromDb(mimeType: string, name?: string, language?: string) {
}
// IDB was only used as a temporary medium;
window.onbeforeunload = (e) => {
window.onbeforeunload = (_e) => {
// See https://link.eddie.sh/NrIIq on why .commit is necessary.
const transaction = db.transaction("decrypted data", "readwrite");
transaction
@ -268,7 +268,7 @@ function createArchivePasteUi({ expiration, data, entries }, name?: string) {
bodyEle.appendChild(mainEle);
}
function createMultiMediaPasteUi(tag, expiration, data, name?: string, on_create?) {
function createMultiMediaPasteUi(tag, expiration, data, name?: string, on_create?: Function | string) {
const bodyEle = document.getElementsByTagName("body")[0];
bodyEle.textContent = '';