User:Jono Bean/common.js
From DQWiki
Jump to navigationJump to search
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
/* 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).");
})();