User:Jono Bean/common.js: Difference between revisions
From DQWiki
Jump to navigationJump to search
mNo edit summary |
mNo edit summary |
||
| Line 1: | Line 1: | ||
/* Lorekeeper Standalone Terminal v6 - Royal | /* Lorekeeper Standalone Terminal v6.1 - Royal Carzala Theme */ | ||
(function() { | (function() { | ||
var checkCount = 0; | var checkCount = 0; | ||
| Line 10: | Line 10: | ||
if (document.getElementById('lore-terminal-btn')) return; | if (document.getElementById('lore-terminal-btn')) return; | ||
var css = | var css = | ||
'#lore-chat::-webkit-scrollbar { width: 5px; }' + | '#lore-chat::-webkit-scrollbar { width: 5px; }' + | ||
'#lore-chat::-webkit-scrollbar-thumb { background: #f97316; border-radius: 10px; }' + | '#lore-chat::-webkit-scrollbar-thumb { background: #f97316; border-radius: 10px; }' + | ||
'.lore-msg { margin-bottom: 12px; padding: 12px 16px; border-radius: 15px; font-size: 14px; line-height: 1.5 | '.lore-msg { margin-bottom: 12px; padding: 12px 16px; border-radius: 15px; font-size: 14px; line-height: 1.5; }' + | ||
'.lore-user { background: #f97316; color: #000; align-self: flex-end; margin-left: 35px; border-bottom-right-radius: 4px; font-weight: 500; }' + | '.lore-user { background: #f97316; color: #000; align-self: flex-end; margin-left: 35px; border-bottom-right-radius: 4px; font-weight: 500; }' + | ||
'.lore-ai { background: #24140e; color: #f7f3e8; align-self: flex-start; margin-right: 35px; border-left: 4px solid #f97316; border-bottom-left-radius: 4px | '.lore-ai { background: #24140e; color: #f7f3e8; align-self: flex-start; margin-right: 35px; border-left: 4px solid #f97316; border-bottom-left-radius: 4px; }'; | ||
var style = document.createElement('style'); | var style = document.createElement('style'); | ||
| Line 24: | Line 22: | ||
document.head.appendChild(style); | document.head.appendChild(style); | ||
var btn = document.createElement('div'); | var btn = document.createElement('div'); | ||
btn.id = 'lore-terminal-btn'; | btn.id = 'lore-terminal-btn'; | ||
btn.innerHTML = '✨'; | btn.innerHTML = '✨'; | ||
btn.setAttribute('style', 'position:fixed !important; bottom:25px !important; right:25px !important; width:65px !important; height:65px !important; background:#2d140e !important; border-radius:50% !important; display:flex !important; align-items:center !important; justify-content:center !important; font-size:32px !important; cursor:pointer !important; box-shadow:0 10px 30px rgba(0,0,0,0.6) !important; z-index:9999999 !important; border:3px solid #f97316 !important | btn.setAttribute('style', 'position:fixed !important; bottom:25px !important; right:25px !important; width:65px !important; height:65px !important; background:#2d140e !important; border-radius:50% !important; display:flex !important; align-items:center !important; justify-content:center !important; font-size:32px !important; cursor:pointer !important; box-shadow:0 10px 30px rgba(0,0,0,0.6) !important; z-index:9999999 !important; border:3px solid #f97316 !important;'); | ||
var box = document.createElement('div'); | var box = document.createElement('div'); | ||
box.id = 'lore-terminal-box'; | box.id = 'lore-terminal-box'; | ||
box.setAttribute('style', 'position:fixed !important; bottom:105px !important; right:25px !important; width: | box.setAttribute('style', 'position:fixed !important; bottom:105px !important; right:25px !important; width:410px !important; height:600px !important; background:#1a0d09 !important; border:1px solid #412a23 !important; border-radius:24px !important; display:none; flex-direction:column !important; box-shadow:0 30px 80px rgba(0,0,0,0.9) !important; z-index:9999999 !important; color:#f7f3e8 !important; font-family:serif !important; overflow:hidden;'); | ||
box.innerHTML = | box.innerHTML = | ||
'<div style="padding:18px 20px; border-bottom:1px solid #412a23; background:rgba(249,115,22,0.05); display:flex; justify-content:space-between; align-items:center;">' + | '<div style="padding:18px 20px; border-bottom:1px solid #412a23; background:rgba(249,115,22,0.05); display:flex; justify-content:space-between; align-items:center;">' + | ||
'<div><b style="color:#f97316; font-size:16px; letter-spacing:1px; text-transform:uppercase;"> | '<div><b style="color:#f97316; font-size:16px; letter-spacing:1px; text-transform:uppercase;">Lorekeeper</b><br><small style="opacity:0.6; font-size:10px;">Duchy of Carzala - Seagate Archives</small></div>' + | ||
'<span id="lore-close" style="cursor:pointer; font-size:24px; opacity:0.5; color:#f97316;">×</span>' + | '<span id="lore-close" style="cursor:pointer; font-size:24px; opacity:0.5; color:#f97316;">×</span>' + | ||
'</div>' + | '</div>' + | ||
'<div id="lore-chat" style="flex:1; overflow-y:auto; padding:20px; display:flex; flex-direction:column; background:#1a0d09;">' + | '<div id="lore-chat" style="flex:1; overflow-y:auto; padding:20px; display:flex; flex-direction:column; background:#1a0d09;">' + | ||
'<div class="lore-msg lore-ai">Greetings, Traveler. I am the | '<div class="lore-msg lore-ai">Greetings, Traveler. I am the Scribe of the Seagate Archives. What knowledge of <b>Carzala</b> do you seek today?</div>' + | ||
'</div>' + | '</div>' + | ||
'<div style="padding | '<div style="padding | ||
Revision as of 08:15, 25 February 2026
/* Lorekeeper Standalone Terminal v6.1 - Royal Carzala Theme */
(function() {
var checkCount = 0;
var initTimer = setInterval(function() {
if (document.body) { clearInterval(initTimer); setupLore(); }
if (checkCount++ > 100) clearInterval(initTimer);
}, 100);
function setupLore() {
if (document.getElementById('lore-terminal-btn')) return;
var css =
'#lore-chat::-webkit-scrollbar { width: 5px; }' +
'#lore-chat::-webkit-scrollbar-thumb { background: #f97316; border-radius: 10px; }' +
'.lore-msg { margin-bottom: 12px; padding: 12px 16px; border-radius: 15px; font-size: 14px; line-height: 1.5; }' +
'.lore-user { background: #f97316; color: #000; align-self: flex-end; margin-left: 35px; border-bottom-right-radius: 4px; font-weight: 500; }' +
'.lore-ai { background: #24140e; color: #f7f3e8; align-self: flex-start; margin-right: 35px; border-left: 4px solid #f97316; border-bottom-left-radius: 4px; }';
var style = document.createElement('style');
style.type = 'text/css';
style.appendChild(document.createTextNode(css));
document.head.appendChild(style);
var btn = document.createElement('div');
btn.id = 'lore-terminal-btn';
btn.innerHTML = '✨';
btn.setAttribute('style', 'position:fixed !important; bottom:25px !important; right:25px !important; width:65px !important; height:65px !important; background:#2d140e !important; border-radius:50% !important; display:flex !important; align-items:center !important; justify-content:center !important; font-size:32px !important; cursor:pointer !important; box-shadow:0 10px 30px rgba(0,0,0,0.6) !important; z-index:9999999 !important; border:3px solid #f97316 !important;');
var box = document.createElement('div');
box.id = 'lore-terminal-box';
box.setAttribute('style', 'position:fixed !important; bottom:105px !important; right:25px !important; width:410px !important; height:600px !important; background:#1a0d09 !important; border:1px solid #412a23 !important; border-radius:24px !important; display:none; flex-direction:column !important; box-shadow:0 30px 80px rgba(0,0,0,0.9) !important; z-index:9999999 !important; color:#f7f3e8 !important; font-family:serif !important; overflow:hidden;');
box.innerHTML =
'<div style="padding:18px 20px; border-bottom:1px solid #412a23; background:rgba(249,115,22,0.05); display:flex; justify-content:space-between; align-items:center;">' +
'<div><b style="color:#f97316; font-size:16px; letter-spacing:1px; text-transform:uppercase;">Lorekeeper</b><br><small style="opacity:0.6; font-size:10px;">Duchy of Carzala - Seagate Archives</small></div>' +
'<span id="lore-close" style="cursor:pointer; font-size:24px; opacity:0.5; color:#f97316;">×</span>' +
'</div>' +
'<div id="lore-chat" style="flex:1; overflow-y:auto; padding:20px; display:flex; flex-direction:column; background:#1a0d09;">' +
'<div class="lore-msg lore-ai">Greetings, Traveler. I am the Scribe of the Seagate Archives. What knowledge of <b>Carzala</b> do you seek today?</div>' +
'</div>' +
'<div style="padding