()
| 261 | })(); |
| 262 | |
| 263 | export 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 | |
| 282 | function wireFolderStripItems(strip, sourceId = '') { |
| 283 | if (!strip) return; |
no test coverage detected