ohmyapi Claude Opus 4.6 (1M context) commited on
Commit
f2310ba
·
1 Parent(s): fd87e79

fix: W is not defined — expose W to global scope for inline onclick handlers

Browse files

var W=window inside IIFE is local, but inline onclick="W._tog()"
runs in global scope. Added window.W=W to expose it globally.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Files changed (1) hide show
  1. outlook2api/static/admin.html +1 -1
outlook2api/static/admin.html CHANGED
@@ -594,7 +594,7 @@ function loadAccts(){
594
  });
595
  }
596
 
597
- var W=window;
598
  W._tog=function(id,v){
599
  api('/admin/api/accounts/'+id,{method:'PATCH',body:{is_active:v}})
600
  .then(function(){toast('Account updated');loadAccts()}).catch(function(e){toast(e.message,1)});
 
594
  });
595
  }
596
 
597
+ var W=window;window.W=W;
598
  W._tog=function(id,v){
599
  api('/admin/api/accounts/'+id,{method:'PATCH',body:{is_active:v}})
600
  .then(function(){toast('Account updated');loadAccts()}).catch(function(e){toast(e.message,1)});