cloze-reader / src /init-env.js
milwright's picture
fix: resolve all console errors and CSP violations
793a92d
raw
history blame
431 Bytes
// Initialize environment variables from meta tags
document.addEventListener('DOMContentLoaded', function() {
const openrouterMeta = document.querySelector('meta[name="openrouter-key"]');
const hfMeta = document.querySelector('meta[name="hf-key"]');
if (openrouterMeta) {
window.OPENROUTER_API_KEY = openrouterMeta.content;
}
if (hfMeta) {
window.HF_API_KEY = hfMeta.content;
}
});