extension: Remove unnecessary lambda functions

This commit is contained in:
Daniel Jacobs 2023-08-22 14:39:47 -04:00 committed by Adrian Wielgosik
parent 89d94ae098
commit eef65da345
1 changed files with 5 additions and 9 deletions

View File

@ -96,7 +96,7 @@ function load(options: string | DataLoadOptions | URLLoadOptions) {
player.id = "player"; player.id = "player";
main.append(player); main.append(player);
player.load(options); player.load(options);
player.addEventListener("loadedmetadata", function () { player.addEventListener("loadedmetadata", () => {
if (player.metadata) { if (player.metadata) {
for (const [key, value] of Object.entries(player.metadata)) { for (const [key, value] of Object.entries(player.metadata)) {
const metadataElement = document.getElementById(key); const metadataElement = document.getElementById(key);
@ -253,16 +253,12 @@ async function loadSwfFromHash() {
} }
} }
window.addEventListener("pageshow", async () => { window.addEventListener("pageshow", loadSwfFromHash);
await loadSwfFromHash();
});
window.addEventListener("hashchange", async () => { window.addEventListener("hashchange", loadSwfFromHash);
await loadSwfFromHash();
});
window.addEventListener("DOMContentLoaded", async () => { window.addEventListener("DOMContentLoaded", () => {
webFormSubmit.addEventListener("click", function () { webFormSubmit.addEventListener("click", () => {
if (webURL.value !== "") { if (webURL.value !== "") {
window.location.hash = webURL.value; window.location.hash = webURL.value;
} }