Update index.html
Browse files- index.html +88 -65
index.html
CHANGED
|
@@ -3,10 +3,10 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
|
| 6 |
-
<title>J.A.R.V.I.S. |
|
| 7 |
<style>
|
| 8 |
:root { --glow: #40e0d0; --bg: #01080b; --accent: rgba(64, 224, 208, 0.2); }
|
| 9 |
-
* { box-sizing: border-box; }
|
| 10 |
|
| 11 |
body, html {
|
| 12 |
background-color: var(--bg); color: var(--glow);
|
|
@@ -15,107 +15,108 @@
|
|
| 15 |
display: flex; flex-direction: column; overflow: hidden;
|
| 16 |
}
|
| 17 |
|
| 18 |
-
/*
|
| 19 |
body::after {
|
| 20 |
-
content: ""; position: absolute; top: 0; left: 0; width: 100%; height:
|
| 21 |
background: linear-gradient(90deg, transparent, var(--glow), transparent);
|
| 22 |
-
opacity: 0.
|
| 23 |
}
|
| 24 |
@keyframes scan { 0% { top: -5%; } 100% { top: 105%; } }
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
#log {
|
| 27 |
-
flex: 1; overflow-y: auto; padding: 40px
|
| 28 |
-
display: flex; flex-direction: column; gap:
|
| 29 |
background: radial-gradient(circle at 50% 50%, #031e27 0%, var(--bg) 100%);
|
| 30 |
}
|
| 31 |
|
| 32 |
.msg {
|
| 33 |
border: 1px solid var(--accent);
|
| 34 |
-
background: rgba(64, 224, 208, 0.
|
| 35 |
-
padding:
|
| 36 |
-
font-size:
|
| 37 |
-
|
| 38 |
}
|
| 39 |
-
.msg:hover { border-color: var(--glow); box-shadow: 0 0 10px rgba(64, 224, 208, 0.1); }
|
| 40 |
|
| 41 |
#ctrl {
|
| 42 |
-
padding:
|
| 43 |
-
border-top:
|
| 44 |
}
|
| 45 |
|
| 46 |
#i {
|
| 47 |
flex: 1; background: #051a1a; border: 1px solid var(--glow);
|
| 48 |
-
color: var(--glow); padding:
|
| 49 |
-
border-radius:
|
| 50 |
}
|
| 51 |
|
| 52 |
button {
|
| 53 |
background: var(--glow); color: #000; border: none;
|
| 54 |
-
padding: 0
|
| 55 |
-
border-radius:
|
| 56 |
}
|
| 57 |
-
button:active { transform: scale(0.95); filter: brightness(1.2); }
|
| 58 |
-
|
| 59 |
-
#auth {
|
| 60 |
-
position: fixed; inset: 0; background: var(--bg);
|
| 61 |
-
display: flex; flex-direction: column; align-items: center; justify-content: center;
|
| 62 |
-
z-index: 1000;
|
| 63 |
-
}
|
| 64 |
-
.hidden { display: none !important; }
|
| 65 |
</style>
|
| 66 |
</head>
|
| 67 |
<body>
|
| 68 |
|
| 69 |
<div id="auth">
|
| 70 |
-
<h1 style="letter-spacing:
|
| 71 |
-
<input type="password" id="p" placeholder="CORE PASSCODE" style="background:none; border:1px solid var(--glow); color:var(--glow); padding:15px; font-size:
|
| 72 |
-
<button onclick="login()" style="margin-top:
|
| 73 |
</div>
|
| 74 |
|
| 75 |
-
<div id="app"
|
| 76 |
<div id="log">
|
| 77 |
-
<div class="msg">|
|
| 78 |
-
<div class="msg">|
|
| 79 |
-
<div class="msg">| STATUS: ALL SYSTEMS OPERATIONAL</div>
|
| 80 |
</div>
|
| 81 |
<div id="ctrl">
|
| 82 |
<button onclick="document.getElementById('fileIn').click()">📷</button>
|
| 83 |
<input type="file" id="fileIn" accept="image/*" style="display:none" onchange="handleImage(this)">
|
| 84 |
-
<input type="text" id="i" placeholder="CMD//" autocomplete="off">
|
| 85 |
<button onclick="send()">RUN</button>
|
| 86 |
</div>
|
| 87 |
</div>
|
| 88 |
|
| 89 |
<script>
|
| 90 |
-
const PASS = "
|
| 91 |
-
const KEY = "AIzaSyDtgwbrNUN9mTzgnmGPtGH_BvokxmXbuIs";
|
| 92 |
|
| 93 |
-
let imgData = null;
|
| 94 |
let isProcessing = false;
|
| 95 |
let history = [];
|
| 96 |
let historyIdx = -1;
|
|
|
|
| 97 |
|
| 98 |
-
|
|
|
|
| 99 |
const pInput = document.getElementById('p');
|
| 100 |
-
const
|
| 101 |
-
const
|
| 102 |
-
|
| 103 |
-
if (pInput.value === PASS) {
|
| 104 |
-
//
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
appScreen.style.display = 'flex'; // Ensures the app layout takes over
|
| 108 |
|
| 109 |
pInput.value = "";
|
| 110 |
-
|
|
|
|
| 111 |
} else {
|
| 112 |
-
|
| 113 |
-
|
| 114 |
}
|
| 115 |
}
|
| 116 |
|
| 117 |
-
|
| 118 |
-
// Command History Logic
|
| 119 |
document.getElementById('i').addEventListener('keydown', (e) => {
|
| 120 |
if (e.key === 'Enter') send();
|
| 121 |
if (e.key === 'ArrowUp') {
|
|
@@ -136,13 +137,16 @@
|
|
| 136 |
});
|
| 137 |
|
| 138 |
function getIST() {
|
| 139 |
-
return new Date().toLocaleString('en-IN', {
|
|
|
|
|
|
|
| 140 |
}
|
| 141 |
|
| 142 |
-
|
|
|
|
| 143 |
if (isProcessing) return;
|
| 144 |
const input = document.getElementById('i');
|
| 145 |
-
const val = input.value.trim() || (imgData ? "
|
| 146 |
if(!val && !imgData) return;
|
| 147 |
|
| 148 |
if(val) { history.push(val); historyIdx = -1; }
|
|
@@ -152,39 +156,58 @@
|
|
| 152 |
isProcessing = true;
|
| 153 |
|
| 154 |
try {
|
| 155 |
-
//
|
| 156 |
-
const url = `https://generativelanguage.googleapis.com/v1beta/models/gemini-
|
| 157 |
|
| 158 |
-
const
|
| 159 |
method: "POST",
|
| 160 |
headers: { "Content-Type": "application/json" },
|
| 161 |
body: JSON.stringify({
|
| 162 |
contents: [{
|
| 163 |
parts: [{
|
| 164 |
-
|
| 165 |
-
text: `[JARVIS] [Concise] Sir: ${val}`
|
| 166 |
}]
|
| 167 |
}],
|
| 168 |
generationConfig: {
|
| 169 |
-
temperature: 0.
|
| 170 |
-
maxOutputTokens: 250, //
|
| 171 |
-
topP: 0.
|
| 172 |
}
|
| 173 |
})
|
| 174 |
});
|
| 175 |
|
| 176 |
-
const d = await
|
| 177 |
if (d.error) {
|
| 178 |
-
alert("CORE
|
| 179 |
} else {
|
| 180 |
const text = d.candidates[0].content.parts[0].text;
|
| 181 |
log.innerHTML += `<div class="msg">J.A.R.V.I.S.: ${text}</div>`;
|
| 182 |
speak(text);
|
| 183 |
}
|
| 184 |
} catch (e) {
|
| 185 |
-
console.log("
|
| 186 |
} finally {
|
| 187 |
isProcessing = false;
|
|
|
|
| 188 |
log.scrollTop = log.scrollHeight;
|
| 189 |
}
|
| 190 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
|
| 6 |
+
<title>J.A.R.V.I.S. | ULTIMATE CORE</title>
|
| 7 |
<style>
|
| 8 |
:root { --glow: #40e0d0; --bg: #01080b; --accent: rgba(64, 224, 208, 0.2); }
|
| 9 |
+
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
|
| 10 |
|
| 11 |
body, html {
|
| 12 |
background-color: var(--bg); color: var(--glow);
|
|
|
|
| 15 |
display: flex; flex-direction: column; overflow: hidden;
|
| 16 |
}
|
| 17 |
|
| 18 |
+
/* SCANNING EFFECT */
|
| 19 |
body::after {
|
| 20 |
+
content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 2px;
|
| 21 |
background: linear-gradient(90deg, transparent, var(--glow), transparent);
|
| 22 |
+
opacity: 0.2; animation: scan 4s linear infinite; pointer-events: none;
|
| 23 |
}
|
| 24 |
@keyframes scan { 0% { top: -5%; } 100% { top: 105%; } }
|
| 25 |
|
| 26 |
+
#auth {
|
| 27 |
+
position: fixed; inset: 0; background: var(--bg);
|
| 28 |
+
display: flex; flex-direction: column; align-items: center; justify-content: center;
|
| 29 |
+
z-index: 9999;
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
#app {
|
| 33 |
+
display: none; /* Controlled by JS Hard-Override */
|
| 34 |
+
flex-direction: column; height: 100vh; width: 100vw;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
#log {
|
| 38 |
+
flex: 1; overflow-y: auto; padding: 40px 20px;
|
| 39 |
+
display: flex; flex-direction: column; gap: 12px;
|
| 40 |
background: radial-gradient(circle at 50% 50%, #031e27 0%, var(--bg) 100%);
|
| 41 |
}
|
| 42 |
|
| 43 |
.msg {
|
| 44 |
border: 1px solid var(--accent);
|
| 45 |
+
background: rgba(64, 224, 208, 0.05);
|
| 46 |
+
padding: 18px; border-radius: 4px;
|
| 47 |
+
font-size: 20px; line-height: 1.4;
|
| 48 |
+
box-shadow: 0 4px 15px rgba(0,0,0,0.3);
|
| 49 |
}
|
|
|
|
| 50 |
|
| 51 |
#ctrl {
|
| 52 |
+
padding: 20px; background: #000; display: flex; gap: 10px;
|
| 53 |
+
border-top: 1px solid var(--glow);
|
| 54 |
}
|
| 55 |
|
| 56 |
#i {
|
| 57 |
flex: 1; background: #051a1a; border: 1px solid var(--glow);
|
| 58 |
+
color: var(--glow); padding: 15px; font-size: 20px;
|
| 59 |
+
border-radius: 4px; outline: none; font-family: inherit;
|
| 60 |
}
|
| 61 |
|
| 62 |
button {
|
| 63 |
background: var(--glow); color: #000; border: none;
|
| 64 |
+
padding: 0 25px; font-size: 18px; font-weight: bold;
|
| 65 |
+
border-radius: 4px; cursor: pointer; text-transform: uppercase;
|
| 66 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
</style>
|
| 68 |
</head>
|
| 69 |
<body>
|
| 70 |
|
| 71 |
<div id="auth">
|
| 72 |
+
<h1 style="letter-spacing: 10px; text-shadow: 0 0 10px var(--glow);">STARK SYSTEMS</h1>
|
| 73 |
+
<input type="password" id="p" placeholder="CORE PASSCODE" style="background:none; border:1px solid var(--glow); color:var(--glow); padding:15px; font-size:22px; text-align:center; outline:none; width: 250px;">
|
| 74 |
+
<button onclick="login()" style="margin-top:20px; height:50px; width: 250px;">INITIALIZE CORE</button>
|
| 75 |
</div>
|
| 76 |
|
| 77 |
+
<div id="app">
|
| 78 |
<div id="log">
|
| 79 |
+
<div class="msg">| PROTOCOL: 3.1 FLASH LITE (PREVIEW)</div>
|
| 80 |
+
<div class="msg">| UPLINK: OPTIMIZED FOR VELOCITY</div>
|
|
|
|
| 81 |
</div>
|
| 82 |
<div id="ctrl">
|
| 83 |
<button onclick="document.getElementById('fileIn').click()">📷</button>
|
| 84 |
<input type="file" id="fileIn" accept="image/*" style="display:none" onchange="handleImage(this)">
|
| 85 |
+
<input type="text" id="i" placeholder="CMD//" autocomplete="off" spellcheck="false">
|
| 86 |
<button onclick="send()">RUN</button>
|
| 87 |
</div>
|
| 88 |
</div>
|
| 89 |
|
| 90 |
<script>
|
| 91 |
+
const PASS = "1234";
|
| 92 |
+
const KEY = "AIzaSyDtgwbrNUN9mTzgnmGPtGH_BvokxmXbuIs";
|
| 93 |
|
|
|
|
| 94 |
let isProcessing = false;
|
| 95 |
let history = [];
|
| 96 |
let historyIdx = -1;
|
| 97 |
+
let imgData = null;
|
| 98 |
|
| 99 |
+
// HARD-OVERRIDE LOGIN
|
| 100 |
+
function login() {
|
| 101 |
const pInput = document.getElementById('p');
|
| 102 |
+
const auth = document.getElementById('auth');
|
| 103 |
+
const app = document.getElementById('app');
|
| 104 |
+
|
| 105 |
+
if (pInput.value.trim() === PASS) {
|
| 106 |
+
// Direct Style Injection to bypass CSS caching
|
| 107 |
+
auth.style.setProperty('display', 'none', 'important');
|
| 108 |
+
app.style.setProperty('display', 'flex', 'important');
|
|
|
|
| 109 |
|
| 110 |
pInput.value = "";
|
| 111 |
+
window.speechSynthesis.cancel();
|
| 112 |
+
speak("Access granted. Speed protocols active. Welcome back, Sir.");
|
| 113 |
} else {
|
| 114 |
+
alert("WRONG PASSCODE. TRY 1234.");
|
| 115 |
+
pInput.value = "";
|
| 116 |
}
|
| 117 |
}
|
| 118 |
|
| 119 |
+
// COMMAND HISTORY NAVIGATION
|
|
|
|
| 120 |
document.getElementById('i').addEventListener('keydown', (e) => {
|
| 121 |
if (e.key === 'Enter') send();
|
| 122 |
if (e.key === 'ArrowUp') {
|
|
|
|
| 137 |
});
|
| 138 |
|
| 139 |
function getIST() {
|
| 140 |
+
return new Date().toLocaleString('en-IN', {
|
| 141 |
+
timeZone: 'Asia/Kolkata', hour: '2-digit', minute: '2-digit', hour12: true
|
| 142 |
+
});
|
| 143 |
}
|
| 144 |
|
| 145 |
+
// ULTRA-FAST UPLINK
|
| 146 |
+
async function send() {
|
| 147 |
if (isProcessing) return;
|
| 148 |
const input = document.getElementById('i');
|
| 149 |
+
const val = input.value.trim() || (imgData ? "Analyze sensory data." : "");
|
| 150 |
if(!val && !imgData) return;
|
| 151 |
|
| 152 |
if(val) { history.push(val); historyIdx = -1; }
|
|
|
|
| 156 |
isProcessing = true;
|
| 157 |
|
| 158 |
try {
|
| 159 |
+
// Using the production endpoint which maps to the 3.1 architecture
|
| 160 |
+
const url = `https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:generateContent?key=${KEY}`;
|
| 161 |
|
| 162 |
+
const r = await fetch(url, {
|
| 163 |
method: "POST",
|
| 164 |
headers: { "Content-Type": "application/json" },
|
| 165 |
body: JSON.stringify({
|
| 166 |
contents: [{
|
| 167 |
parts: [{
|
| 168 |
+
text: `[JARVIS: ULTRA-FAST] [British/Witty] [Time: ${getIST()}] Sir: ${val}`
|
|
|
|
| 169 |
}]
|
| 170 |
}],
|
| 171 |
generationConfig: {
|
| 172 |
+
temperature: 0.5,
|
| 173 |
+
maxOutputTokens: 250, // Shorter response = Faster response
|
| 174 |
+
topP: 0.1, // Less randomness = Quicker processing
|
| 175 |
}
|
| 176 |
})
|
| 177 |
});
|
| 178 |
|
| 179 |
+
const d = await r.json();
|
| 180 |
if (d.error) {
|
| 181 |
+
alert("CORE ERROR: " + d.error.message);
|
| 182 |
} else {
|
| 183 |
const text = d.candidates[0].content.parts[0].text;
|
| 184 |
log.innerHTML += `<div class="msg">J.A.R.V.I.S.: ${text}</div>`;
|
| 185 |
speak(text);
|
| 186 |
}
|
| 187 |
} catch (e) {
|
| 188 |
+
console.log("Connection lag.");
|
| 189 |
} finally {
|
| 190 |
isProcessing = false;
|
| 191 |
+
imgData = null;
|
| 192 |
log.scrollTop = log.scrollHeight;
|
| 193 |
}
|
| 194 |
}
|
| 195 |
+
|
| 196 |
+
function speak(t) {
|
| 197 |
+
window.speechSynthesis.cancel();
|
| 198 |
+
const u = new SpeechSynthesisUtterance(t);
|
| 199 |
+
u.rate = 1.15; // Faster voice for a snappier feel
|
| 200 |
+
window.speechSynthesis.speak(u);
|
| 201 |
+
}
|
| 202 |
+
|
| 203 |
+
function handleImage(input) {
|
| 204 |
+
const reader = new FileReader();
|
| 205 |
+
reader.onload = (e) => {
|
| 206 |
+
imgData = e.target.result.split(',')[1];
|
| 207 |
+
send();
|
| 208 |
+
};
|
| 209 |
+
reader.readAsDataURL(input.files[0]);
|
| 210 |
+
}
|
| 211 |
+
</script>
|
| 212 |
+
</body>
|
| 213 |
+
</html>
|