brain-lab / brain_lab /static /hosted-pictionary.js
Chungulus's picture
Deploy Brain Lab CPU classroom app with verified saved research playback
663ec84 verified
Raw History Blame Contribute Delete
966 Bytes
// No key values enter the browser. This only presents the server's capability.
export function applySharedPictionary(root,config){
const panel=root.querySelector('#sketch-provider')?.closest('.card');
let notice=root.querySelector('#shared-recognition-note');
if(config.shared_key_enabled){
if(panel)panel.hidden=true;
if(!notice){notice=document.createElement('p');notice.id='shared-recognition-note';notice.className='note';root.querySelector('.card-title')?.after(notice)}
notice.hidden=false;
notice.textContent='Classroom recognition is ready—no API key needed. Your drawing goes to Qwen and Decider; the private game prompt stays in your browser.';
const info=root.querySelector('#guess-info');if(info&&!root.querySelector('#drawing')?.dataset.sharedReady){info.textContent='Draw anything. The classroom AI is ready.';root.querySelector('#drawing').dataset.sharedReady='true'}
}else{if(panel)panel.hidden=false;if(notice)notice.hidden=true}
}