From ff53187da716b18975c7c2f356e85459c47a0833 Mon Sep 17 00:00:00 2001 From: Raven Scott Date: Wed, 2 Oct 2024 05:42:00 -0400 Subject: [PATCH] update AI page --- public/js/chat.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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); } -