bend_puzzle/runtime-config.js
2026-08-01 16:06:14 +09:00

10 lines
505 B
JavaScript

'use strict';
(function configureLinkFieldRuntime(root){
let appBaseUrl='',apiBridgeUrl='';
try{
const scriptUrl=root.document?.currentScript?.src||root.location?.href||'';
appBaseUrl=new URL('./',scriptUrl).href;
apiBridgeUrl=new URL('api-bridge.php',appBaseUrl).href;
}catch(_){appBaseUrl='';apiBridgeUrl=''}
root.BendRuntimeConfig=Object.freeze({cloudApi:true,singleSharedWorld:true,worldId:'link-field-main',appBaseUrl,apiBridgeUrl,realtimeTransport:'http-poll'});
})(globalThis);