openvibers/openvibe.live Commits

Home: no requests for the Games leaderboards and pixel canvas until OpenVibe.Games serves them (they 404 and every first visit logged CORS errors for sections that stay hidden); one switch, GAMES_HOME_WIDGETS, turns them back on (WS-M task 7, owner decision O15)

OP OpenVibers committed 25 Sept 2026 · b801679713 · 1 file, +7 −0


Changes

ddiff --git a/public/js/app-home.js b/public/js/app-home.js
iindex 0d1ac78d..09bba3d3 100644
---- a/public/js/app-home.js
++++ b/public/js/app-home.js
@@@ -1541,7 +1541,13 @@ async function loadHomePastes(opts) {
} catch { rail.filling = false; }
}
++// OpenVibe.Games does not serve /api/game/leaderboard/* or /api/game/canvas/state (the pixel canvas is
++// owner decision O15), so every first visit logged CORS errors for sections that stay hidden. Turn this
++// on when Games serves them (public, CORS for first-party origins) — roadmap WS-M task 7.
++const GAMES_HOME_WIDGETS = false;
++
async function loadHomeLeaderboards() {
++ if (!GAMES_HOME_WIDGETS) { const h = document.getElementById('home-quest-header'); if (h) h.style.display = 'none'; return; }
try {
const boards = ['total_level', 'combat', 'mining', 'fishing'];
const questUrl = getScraplandiaUrl();
@@@ -1608,6 +1614,7 @@ async function fetchServiceJson(url) {
}
async function loadHomeCanvas() {
++ if (!GAMES_HOME_WIDGETS) { const h = document.getElementById('home-canvas-header'); if (h) h.style.display = 'none'; return; }
try {
const header = document.getElementById('home-canvas-header');
const container = document.getElementById('home-canvas-preview');