extension: Remove unnecessary lambda functions
This commit is contained in:
parent
89d94ae098
commit
eef65da345
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue