User:Jono Bean/common.js: Difference between revisions
From DQWiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
/* Lorekeeper Widget Loader ( | /* Lorekeeper Widget Loader (Production) */ | ||
(function() { | (function() { | ||
// Prevents loading multiple times | |||
if (document.getElementById('lorekeeper-widget-container')) return; | if (document.getElementById('lorekeeper-widget-container')) return; | ||
| Line 7: | Line 8: | ||
container.style.cssText = 'position: fixed; bottom: 25px; right: 25px; z-index: 100000;'; | container.style.cssText = 'position: fixed; bottom: 25px; right: 25px; z-index: 100000;'; | ||
// | // Pointing directly to the NPC Forge Hosted App | ||
container.innerHTML = | container.innerHTML = | ||
'<iframe src=" | '<iframe src="https://npc-forge--npc-forge-qh4gc.asia-southeast1.hosted.app/lore?widget=true" ' + | ||
'style="width: 450px; height: 650px; border: 1px solid rgba(139, 92, 246, 0.4); ' + | 'style="width: 450px; height: 650px; border: 1px solid rgba(139, 92, 246, 0.4); ' + | ||
'border-radius: 32px; box-shadow: 0 25px 70px rgba(0,0,0,0.7); ' + | 'border-radius: 32px; box-shadow: 0 25px 70px rgba(0,0,0,0.7); ' + | ||
| Line 16: | Line 17: | ||
document.body.appendChild(container); | document.body.appendChild(container); | ||
console.log("Lorekeeper API Widget Initialized (Hosted App)."); | |||
})(); | })(); | ||
Revision as of 07:47, 25 February 2026
/* Lorekeeper Widget Loader (Production) */
(function() {
// Prevents loading multiple times
if (document.getElementById('lorekeeper-widget-container')) return;
var container = document.createElement('div');
container.id = 'lorekeeper-widget-container';
container.style.cssText = 'position: fixed; bottom: 25px; right: 25px; z-index: 100000;';
// Pointing directly to the NPC Forge Hosted App
container.innerHTML =
'<iframe src="https://npc-forge--npc-forge-qh4gc.asia-southeast1.hosted.app/lore?widget=true" ' +
'style="width: 450px; height: 650px; border: 1px solid rgba(139, 92, 246, 0.4); ' +
'border-radius: 32px; box-shadow: 0 25px 70px rgba(0,0,0,0.7); ' +
'background: #09090b; display: block;" ' +
'frameborder="0" allow="microphone; autoplay"></iframe>';
document.body.appendChild(container);
console.log("Lorekeeper API Widget Initialized (Hosted App).");
})();