From 7f65ec2490dba5b0a0ad1930f24f3cdf75d86a72 Mon Sep 17 00:00:00 2001 From: techcow2 <108380065+techcow2@users.noreply.github.com> Date: Wed, 21 Aug 2024 13:45:14 -0400 Subject: [PATCH] Add files via upload --- index.html | 26 +++++++++++++------------- script.js | 40 ---------------------------------------- styles.css | 37 ------------------------------------- 3 files changed, 13 insertions(+), 90 deletions(-) diff --git a/index.html b/index.html index bc7b612..0189a20 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ - NetSim - AI-Powered Web Simulations + NetSim - AI Powered Simulations @@ -47,18 +47,18 @@
- - - -
+ + + +
diff --git a/script.js b/script.js index affad44..8f7d5ce 100644 --- a/script.js +++ b/script.js @@ -1011,46 +1011,6 @@ window.onload = function() { e.preventDefault(); }; -function toggleRevisions() { - const revisionsPanel = document.getElementById('revisions-panel'); - if (revisionsPanel.style.display === 'block') { - revisionsPanel.style.display = 'none'; - } else { - displayRevisions(); - revisionsPanel.style.display = 'block'; - } -} - -function displayRevisions() { - const revisionsPanel = document.getElementById('revisions-panel'); - revisionsPanel.innerHTML = ''; // Clear the panel - - history.forEach((revision, index) => { - const revisionItem = document.createElement('div'); - revisionItem.className = 'revision-item'; - revisionItem.innerHTML = ` - Revision ${index} -
${revision.input}
- `; - revisionItem.addEventListener('click', () => restoreRevision(index)); - revisionsPanel.appendChild(revisionItem); - }); -} - -function restoreRevision(index) { - const revision = history[index]; - currentSimulation = revision.simulation; - const frame = document.getElementById('simulation-frame'); - frame.contentDocument.open(); - frame.contentDocument.write(currentSimulation); - frame.contentDocument.close(); - - // Hide the revisions panel after restoring - document.getElementById('revisions-panel').style.display = 'none'; - - updateAddressBar(revision.input); - updatePageTitle(`NetSim: ${revision.input}`); -} document.getElementById('maximize-button').onclick = function() { diff --git a/styles.css b/styles.css index 1250f85..0866cef 100644 --- a/styles.css +++ b/styles.css @@ -645,40 +645,3 @@ body, html { border: 2px solid #2b2d42; box-shadow: 0 0 10px #00ff00; } -#revisions-panel { - position: absolute; - top: 100%; - left: 0; - right: 0; - background: white; - border: 1px solid #ccc; - border-radius: 0 0 4px 4px; - box-shadow: 0 2px 10px rgba(0,0,0,0.1); - display: none; - max-height: 60vh; - overflow-y: auto; - z-index: 1000; -} - -.revision-item { - display: flex; - padding: 12px; - border-bottom: 1px solid #eee; - cursor: pointer; -} - -.revision-item:hover { - background-color: #f5f5f5; -} - -.revision-screenshot { - width: 150px; - height: 90px; - object-fit: cover; - margin-right: 15px; -} - -.revision-prompt { - flex-grow: 1; - font-size: 14px; -}