diff --git a/public/js/chat.js b/public/js/chat.js index 6767d52..93aa6d0 100644 --- a/public/js/chat.js +++ b/public/js/chat.js @@ -200,19 +200,22 @@ document.addEventListener('DOMContentLoaded', function () { resetChat(false); }); +function openWindow(url, windowName, width, height) { + window.open(url, windowName, `width=${width},height=${height},menubar=no,toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes`); +} + function openGpuStats() { - window.open('https://chat.x64.world/smi.html', 'gpuStatsWindow', 'width=800,height=600,menubar=no,toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes'); + openWindow('https://chat.x64.world/smi.html', 'gpuStatsWindow', 800, 600); } function openLiveLog() { - window.open('https://llama-live-log.x64.world/', 'liveLogWindow', 'width=600,height=600,menubar=no,toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes'); + openWindow('https://llama-live-log.x64.world/', 'liveLogWindow', 600, 600); } function openTop() { - window.open('https://ai-top.x64.world/', 'liveLogGtopWindow', 'width=800,height=600,menubar=no,toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes'); + openWindow('https://ai-top.x64.world/', 'liveLogGtopWindow', 800, 600); } function openAbout() { - window.open('https://raven-scott.fyi/about-rayai', 'aboutRAIWindow', 'width=800,height=650,menubar=no,toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes'); + openWindow('https://raven-scott.fyi/about-rayai', 'aboutRAIWindow', 800, 650); } -