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:
@@ -39,7 +39,7 @@ function displayName(p) {
|
||||
return String(p).trim();
|
||||
}
|
||||
|
||||
export class PlayerList {
|
||||
class PlayerList {
|
||||
constructor() {
|
||||
this._active = false;
|
||||
/** @type {HTMLElement | null} */
|
||||
@@ -315,3 +315,6 @@ export class PlayerList {
|
||||
this._animationTimers = [];
|
||||
}
|
||||
}
|
||||
|
||||
window.OBS = window.OBS || {};
|
||||
window.OBS.PlayerList = PlayerList;
|
||||
|
||||
Reference in New Issue
Block a user