Skip to content

Commit b433a1a

Browse files
committed
fix lints (priste uz nebudu tak hodnej)
1 parent 49cd35c commit b433a1a

4 files changed

Lines changed: 11 additions & 24 deletions

File tree

‎geohash.deno.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ async function getDjiaFor(key: string) {
88
const stored = djiaCache.get(key);
99
if (stored) return await stored;
1010

11-
let resolve = (x: string) => {};
12-
let reject = (x: string) => {};
11+
let resolve = (_x: string) => {};
12+
let reject = (_x: string) => {};
1313
const promise = new Promise<string>((res, rej) => {
1414
resolve = res;
1515
reject = rej;

‎server.deno.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ async function handleEvent(e: RequestEvent): Promise<Response | null> {
102102
});
103103
}
104104

105-
return new Response(videoBytes as any, {
105+
return new Response(videoBytes.buffer, {
106106
headers: {
107107
"Content-Type": "video/mp4",
108108
"Access-Control-Allow-Origin": "*"
@@ -127,7 +127,7 @@ async function handleEvent(e: RequestEvent): Promise<Response | null> {
127127
});
128128
}
129129

130-
return new Response(sticekrBytes as any, {
130+
return new Response(sticekrBytes.buffer, {
131131
headers: {
132132
"Content-Type": "image/webp"
133133
},

‎static/kvh/app.js‎

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
1-
async function fetchNthVideo(index) {
2-
try {
3-
const response = await fetch();
4-
if (response.ok) {
5-
const blob = await response.blob();
6-
return URL.createObjectURL(blob);
7-
}
8-
} catch (error) { }
9-
return null; // No more videos
10-
}
11-
121
function loadVideo(src) {
132
return new Promise((resolve, reject) => {
143
const video = document.createElement('video');
@@ -87,9 +76,7 @@ function spawnVideo(video) {
8776
console.log('Spawned video:', video.src, 'at', x, y, 'velocity', vx, vy);
8877
}
8978

90-
let currentIndex = 0;
91-
92-
async function startNextDownload(i) {
79+
function startNextDownload(i) {
9380
loadVideo(`/api/videos/${i}`)
9481
.then(spawnVideo)
9582
.then(function() { setTimeout(function(){startNextDownload(i+1);},2000);})
@@ -225,8 +212,8 @@ function updateBallRadius() {
225212
}
226213

227214
// Handle both resize and orientation change events
228-
window.addEventListener('resize', updateBallRadius);
229-
window.addEventListener('orientationchange', function() {
215+
globalThis.addEventListener('resize', updateBallRadius);
216+
globalThis.addEventListener('orientationchange', function() {
230217
// Delay to allow viewport to settle after orientation change
231218
setTimeout(updateBallRadius, 100);
232219
});
@@ -302,9 +289,9 @@ function initializeMobileHandling() {
302289
}, { passive: false });
303290

304291
// Handle viewport height changes (mobile keyboard, etc.)
305-
let lastViewportHeight = window.innerHeight;
306-
window.addEventListener('resize', function() {
307-
const currentHeight = window.innerHeight;
292+
let lastViewportHeight = globalThis.innerHeight;
293+
globalThis.addEventListener('resize', function() {
294+
const currentHeight = globalThis.innerHeight;
308295
if (Math.abs(currentHeight - lastViewportHeight) > 100) {
309296
// Significant height change, likely keyboard or orientation
310297
setTimeout(function() {

‎tgbot.deno.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// The authors disclaim copyright to this source code (they are ashamed to
33
// admit they wrote it)
44

5-
import unidecode from "npm:unidecode";
5+
import unidecode from "npm:unidecode@1.1.0";
66
import { geohash } from "./geohash.deno.ts";
77
import {
88
getImageForPoint,

0 commit comments

Comments
 (0)