Kokkoja as of 2026-10-10: the teacher's requests, the Session window, notices, the QR code, the license
This commit is contained in:
1 parent
95c80d04c9
commit
1d087af633
32 files changed
+4917
-890
No files matched your search
@@ -11,13 +11,21 @@
|
||||
/** Resolutions outside this range are mistakes, not information. */
|
||||
const LEAST_DPI = 30;
|
||||
const MOST_DPI = 2400;
|
||||
/**
|
||||
* The nominal screen resolutions that cameras, phones and screenshots
|
||||
* write without meaning them; an image so marked arrives at the default
|
||||
* size instead (Andy, 2026-10-08, with every image now placed at its
|
||||
* natural size: at 72 dpi a phone's photo would be over a metre wide).
|
||||
*/
|
||||
const NOMINAL_DPI = [72, 96];
|
||||
|
||||
/**
|
||||
* @param {number | null} dpi
|
||||
* @returns {number | null}
|
||||
*/
|
||||
function plausible(dpi) {
|
||||
return dpi !== null && dpi >= LEAST_DPI && dpi <= MOST_DPI ? dpi : null;
|
||||
if (dpi === null || dpi < LEAST_DPI || dpi > MOST_DPI) return null;
|
||||
return NOMINAL_DPI.some((nominal) => Math.abs(dpi - nominal) < 0.5) ? null : dpi;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user