fix: convert ES modules to classic scripts for file:// compatibility

Browsers block ES module imports over the file:// protocol due to CORS.
Users opening the overlay by double-clicking the HTML file saw all JS
fail to load. Replace import/export with a window.OBS global namespace
and classic <script> tags so the overlay works without a local server.

Made-with: Cursor
This commit is contained in:
cottongin
2026-03-20 22:20:12 -04:00
parent a8b7df48a6
commit fa7363bc78
7 changed files with 54 additions and 33 deletions

View File

@@ -43,7 +43,7 @@
* @property {HTMLInputElement} line2HideDuration
*/
export class RoomCodeDisplay {
class RoomCodeDisplay {
/** @type {RoomCodeDisplayElements | null} */
#elements = null;
@@ -381,3 +381,6 @@ export class RoomCodeDisplay {
}
}
}
window.OBS = window.OBS || {};
window.OBS.RoomCodeDisplay = RoomCodeDisplay;