[build] upgrade eslint to 9.37.0 (#88)

Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Reviewed-on: https://codeberg.org/superseriousbusiness/masto-fe-standalone/pulls/88
Co-authored-by: Zoë Bijl <moiety@noreply.codeberg.org>
Co-committed-by: Zoë Bijl <moiety@noreply.codeberg.org>
This commit is contained in:
Zoë Bijl
2025-10-12 13:42:02 +02:00
committed by tobi
parent 75d7a62693
commit 1ff70886a1
975 changed files with 22196 additions and 21964 deletions

View File

@@ -1,17 +1,17 @@
// @ts-check
(function () {
'use strict';
"use strict";
/**
* @param {() => void} loaded
*/
var ready = function (loaded) {
if (document.readyState === 'complete') {
if (document.readyState === "complete") {
loaded();
} else {
document.addEventListener('readystatechange', function () {
if (document.readyState === 'complete') {
document.addEventListener("readystatechange", function () {
if (document.readyState === "complete") {
loaded();
}
});
@@ -22,23 +22,23 @@
/** @type {Map<number, HTMLIFrameElement>} */
var iframes = new Map();
window.addEventListener('message', function (e) {
window.addEventListener("message", function (e) {
var data = e.data || {};
if (typeof data !== 'object' || data.type !== 'setHeight' || !iframes.has(data.id)) {
if (typeof data !== "object" || data.type !== "setHeight" || !iframes.has(data.id)) {
return;
}
var iframe = iframes.get(data.id);
if ('source' in e && iframe.contentWindow !== e.source) {
if ("source" in e && iframe.contentWindow !== e.source) {
return;
}
iframe.height = data.height;
});
[].forEach.call(document.querySelectorAll('iframe.mastodon-embed'), function (iframe) {
[].forEach.call(document.querySelectorAll("iframe.mastodon-embed"), function (iframe) {
// select unique id for each iframe
var id = 0, failCount = 0, idBuffer = new Uint32Array(1);
while (id === 0 || iframes.has(id)) {
@@ -53,14 +53,14 @@
iframes.set(id, iframe);
iframe.scrolling = 'no';
iframe.style.overflow = 'hidden';
iframe.scrolling = "no";
iframe.style.overflow = "hidden";
iframe.onload = function () {
iframe.contentWindow.postMessage({
type: 'setHeight',
type: "setHeight",
id: id,
}, '*');
}, "*");
};
iframe.onload();