MCPcopy Create free account
hub / github.com/error311/FileRise / initOnlyOfficeCaps

Function initOnlyOfficeCaps

public/js/fileListView.js:263–280  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

261})();
262
263export async function initOnlyOfficeCaps() {
264 if (window.__FR_OO_PROMISE) return window.__FR_OO_PROMISE;
265 window.__FR_OO_PROMISE = (async () => {
266 try {
267 const r = await fetch(withBase('/api/onlyoffice/status.php'), { credentials: 'include' });
268 if (!r.ok) throw 0;
269 const j = await r.json();
270 OO_ENABLED = !!j.enabled;
271 OO_EXTS = new Set(Array.isArray(j.exts) ? j.exts : []);
272 } catch (e) {
273 OO_ENABLED = false;
274 OO_EXTS = new Set();
275 } finally {
276 window.__FR_OO_PROMISE = null;
277 }
278 })();
279 return window.__FR_OO_PROMISE;
280}
281
282function wireFolderStripItems(strip, sourceId = '') {
283 if (!strip) return;

Callers 1

loadFileListFunction · 0.85

Calls 1

withBaseFunction · 0.85

Tested by

no test coverage detected