Spaces:
Running
Running
File size: 17,488 Bytes
7dfb20b 83db369 7dfb20b 4006459 bf9b5f9 9e59f44 4006459 c1a4aa9 9714f25 6b90a39 658ccc6 5120737 90523aa 7dfb20b 32881b4 3529960 32881b4 7172df9 7dfb20b 5d2338c 4f299cc 3529960 4f299cc fa49064 8e34432 4577c39 987a004 8d3466c 987a004 1fee843 a3aac3d bab82e1 9e59f44 50cfa20 3529960 5d2338c 7dfb20b 8d3466c 7dfb20b f44f27e f1cc368 f44f27e 7dfb20b 8d3466c f44f27e 7dfb20b 6319fe5 7dfb20b 83db369 4290743 83db369 36b91fc b51cdf6 8922313 4340f17 4148bc2 a91bd7e 3fc96e5 7733a26 bb11ed7 89cb58d 4c37348 8503381 a3aac3d 3529960 658ccc6 a3aac3d 09974aa a3aac3d 2ebacf2 a3aac3d dcc1609 7e61031 dcc1609 d57d8c9 7096b82 98cf34f d57d8c9 07116d0 c0eebf5 d57d8c9 50cfa20 a2eeb49 4e16b24 a2eeb49 0fb642d 6bff415 5d2338c 0fb642d 83db369 8d3466c 83db369 c1f0c35 c47440a 12354f8 ab1173c 75ccdf9 c65ceca 9e59f44 c1f0c35 12354f8 0fb642d e0e07a7 06c3a5f adc6c1e f03966f 50cfa20 32881b4 c1f0c35 e6ed252 f933794 d3ca8a0 adc6c1e 0fb642d 706cd6b f933794 706cd6b 9714f25 50cfa20 9714f25 4aabf24 9714f25 9383eff 9714f25 9e123d1 9714f25 f933794 75ccdf9 9714f25 926c8ef 1bf46d0 ad998a1 50aa50b 1432bc1 b3bed5a 50aa50b ad998a1 1abd420 9714f25 01ca5b7 fe001e3 194b422 fe001e3 01d3f74 4c37348 0da4ce6 1bce8d2 b51cdf6 1bce8d2 8055803 1df6078 718ca2f 3fc96e5 5d59cd3 7c2bc7f c4766dd 1bce8d2 8ab940a f839496 8ab940a 860c411 7dfb20b 3529960 7dfb20b 4c73afa 0d33197 1a76924 0d33197 b44051a 658ccc6 18c911c 335ffd7 6bff415 489188b 1f3bfdf 86db72d 83db369 335ffd7 115b217 30f5957 d9063d0 86db72d 247198f 335ffd7 247198f 115b217 9714f25 335ffd7 a7ca6dd 26468bf a7ca6dd 26468bf bd475c7 26468bf b987ab8 a7ca6dd 1abd420 ef9369f 493358e 15acfc8 da03cdb 15acfc8 493358e 042373d 15acfc8 7dfb20b 83db369 7dfb20b 0b3a3ad 0451e9f 64da8a6 0451e9f ef6998d 0451e9f 64da8a6 f8d2980 a02a34b a0daf23 0451e9f 79bc394 0451e9f 9bcd4b9 0451e9f 9bcd4b9 0451e9f 609ea1e 8ea01b2 658ccc6 8ea01b2 9bcd4b9 0451e9f 9bcd4b9 0451e9f 572f78b 0451e9f 26e3a34 1da6d82 572f78b fc46b7c 1da6d82 572f78b fc0ddc5 572f78b a77854c 64da8a6 0451e9f 66a828d 0451e9f ef6998d f8d2980 97178e5 66a828d 0451e9f 658ccc6 0451e9f 64da8a6 0451e9f 77c20ac a2c263a 64da8a6 9714f25 462c77b 11f9dba 462c77b 9714f25 1d77803 9714f25 658ccc6 9714f25 b5b4524 4e95b67 b5b4524 4e95b67 b5b4524 4e95b67 b5b4524 4e95b67 b5b4524 4e95b67 e5c0c47 ad998a1 60731a9 6c0c3d9 9bed813 332475d 9bed813 e1bc61d 9bed813 276a19d 9bed813 276a19d b3bed5a ad998a1 60731a9 b3bed5a 9bed813 462c77b 7dfb20b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 |
<!DOCTYPE html>
<html>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<head>
<meta property="og:title" content="a random unsecured camera" />
<meta property="og:image" content="{{ url_for('static', filename='searching.png') }}" />
<meta property="og:url" content="https://unsecuredcamera.com" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Silkscreen:wght@400;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
<link rel="preload" href="{{ url_for('static', filename='eye.gif') }}" as="image">
<link rel="preload" href="{{ url_for('static', filename='andalemono.ttf') }}" as="font" type="font/ttf" crossorigin>
<link rel="icon" type="image/png" href="https://i.ibb.co/gvKPXJD/eye.gif">
<title>{{ page_title|safe }}</title>
<style>
:root {
--text-color: white;
}
button {
cursor: pointer;
}
body {
font-size: 10pt !important;
justify-content: center;
background-color: black;
display: flex;
align-items:center;
height: 100vh;
margin: auto;
}
/* Webkit browsers like Chrome, Safari */
::-webkit-scrollbar {
width: 10px;
border-radius: 5px;
}
::-webkit-scrollbar-thumb {
background: black;
border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
background: black;
}
/* Firefox */
* {
scrollbar-width: thin;
scrollbar-color: black black;
}
h3 {
margin-bottom: 0px;
margin-top: 0px !important;
color:var(--text-color);
font-family: 'Andale Mono';
font-weight: normal;
font-size: 10pt
}
.pulse {
width: 40px;
height: 40px;
border-radius: 50%;
position: absolute;
background-color: black;
opacity: 0.5;
animation: pulse-animation 5s infinite;
margin-left: -20px;
margin-top: -20px;
}
.dot {
border-style: solid;
border-width: 2px;
border-color: black;
width: 5px;
height: 5px;
border-radius: 50%;
position: absolute;
background-color: black;
margin-left: -4.5px;
margin-top: -4.5px;
}
@keyframes pulse-animation {
0% { transform: scale(0.1); opacity: 0.4; }
100% { transform: scale(3); opacity: 0; }
}
.flex-container {
display: flex;
justify-content: left;
align-items: top;
}
.outer-container {
display: inline-block;
justify-content: left;
max-width: 70vw;
}
#feed-div {
display: flex;
justify-content: right;
width: 90%;
height: 90%;
position: relative;
margin-right: 20px;
}
h1 {
margin: 0px;
margin-top: 20px;
font-weight: normal;
font-size: 10pt;
}
.feed {
transition: opacity 1s ease;
width: 100%;
height: 100%;
max-height: 80vh;
border-radius: 5px;
}
.map-div {
position: relative;
width: 280px;
height: 190px;
margin-top: 3%;
margin-bottom: 3%;
box-sizing: border-box;
}
.info {
cursor: default;
display: flex;
flex-direction: column;
align-items: flex-start;
width: 400px;
transition 0.5s ease;
}
@font-face {font-family: "Andale Mono";src: url("static/andalemono.ttf") format("truetype");}
#info {
transition 1s ease;
}
#info-text {
margin-top: 15px;
margin-bottom: 0px;
font-size: 10pt;
}
a:hover {
background-color: white;
color: black;
transition: 0.1s ease;
}
a {
background-color: transparent;
border-radius: 0px;
text-decoration: none;
color:var(--text-color);
transition: 0.1s ease;
font-size: 10pt;
}
.hoverButton {
text-align: left;
padding: 5px;
border: none;
font-size: 10pt;
font-family: 'Andale Mono';
color: var(--text-color);
transition: 0.1s ease;
font-size: 10pt;
border-radius: 0px;
border: 1px yellow solid;
background-color: black;
}
.hoverButton:hover {
color: black;
background-color: yellow;
}
.tag {
font-family: 'Andale Mono';
margin: auto;
color:grey;
}
#location-name:hover {
color: black;
}
#share {
cursor: pointer;
margin: auto;
margin-left: 10px;
color: yellow;
transition: 0.1s ease;
}
#share:hover {
opacity: 0.5;
}
#show-more {
cursor: pointer;
}
#additional-info {
display: block;
height: 0px;
overflow: hidden;
transition: height 0.3s ease;
}
#additional-info.expanded {
height: auto;
}
@media only screen and (orientation: portrait) {
.body {
height: 85vh;
}
h1 {
margin-top: 20px !important;
}
.flex-container {
flex-direction: column;
align-items: left;
}
.map-div {
width: 100%;
height: 100%;
}
.outer-container {
max-width: 85vw;
}
#feed-div {
justify-content: left;
width: 100%;
max-height: 45%;
margin-right: 0;
}
.feed {
height: 100%;
width: 100%;
max-height: 100%;
}
}
</style>
</head>
<body style="background-color: black;">
<div class="outer-container">
<div class="flex-container">
<div id="feed-div">
<img id="feed" class="feed" src="static/eye.gif" />
</div>
<div class="info" id="info">
<h1 id="country" style="color:var(--text-color); margin-top: 10px; font-family: 'Andale Mono'; margin-bottom: 2px;"> searching...</h1>
<a href="{{ ip_link }}" target="_blank"> <h3 id="location-name">{{ page_title|safe }}</h3></a>
<div style="display: flex; margin-top: 15px; margin-bottom: 0%;">
<a href="?new=true" style="margin-right: 10px; display: inline-block;">
<button class="hoverButton">
another
</button>
</a>
<!--<a class="abortButton" href="?new=false&id={{ id }}" id="refreshSameFeedButton" style="display: inline-block;">-->
<a class="abortButton" href="?new=false&id={{ id }}" id="refreshSameFeedButton" style="display: inline-block;">
<button class="hoverButton">
refresh
</button>
</a>
<i id="share" class="fa-solid fa-link" data-id="{{ id }}"></i>
<p id="copied" class="tag" style="visibility: hidden;">copied</p>
</div>
<p id="info-text" style="color:var(--text-color); font-family: 'Andale Mono';">
time: <span id="time"></span><br>
<span id="additional-info">
owner: {{ owner }}<br>
ip: {{ ip }}<br>
lat, lon: {{ loc }}
<!--</span><span id="show-more">more <i style="margin-bottom:5px; color:var(--text-color);" id="more-button" class="fa-solid fa-caret-down"></i>--></span>
<br>
<span id="tag">
this is UNSECURED CAMERA<br>
made by <a href=mailto:[email protected]>brayden moore</a><br>
please come again</span>
</p>
<!--
<div class="map-div">
<img id="map" src="{{ url_for('static', filename='map_populated.png') }}" style="width: 100%; height: 100%;" />
<div class="dot" style="left: {{ X }}%; top: {{ Y }}%;"></div>
<div class="pulse" style="left: {{ X }}%; top: {{ Y }}%;"></div>
</div>
-->
</div>
</div>
</div>
<script>
// Handle feed load and refresh
let loadingGif = "{{ url_for('static', filename='eye.gif') }}";
let currentFeed;
let firstLoad = true;
document.addEventListener("DOMContentLoaded", function() {
const feed = document.getElementById("feed");
feed.style.width = "80px";
feed.style.height = "50px";
feed.src = loadingGif;
feed.style.opacity = "0.5";
const infoDiv = document.getElementById("info");
const infoText = document.getElementById("info-text");
infoText.style.opacity = "0%";
infoText.style.height = "0%";
const countryElement = document.getElementById("country");
const locationName = document.getElementById('location-name');
locationName.textContent = "{{ page_title|safe }}";
const newUrl = "{{ url|safe }}";
let contentTypeChecked = false;
let isJpeg = false;
function refreshImage() {
if (!isJpeg && !contentTypeChecked) {
let xhr = new XMLHttpRequest();
xhr.open('HEAD', newUrl, true);
xhr.onreadystatechange = function() {
if (xhr.readyState === 4 && xhr.status === 200) {
if (xhr.getResponseHeader('Content-Type') === 'image/jpeg') {
img.src = newUrl + "?r=" + new Date().getTime();
if (firstLoad){
countryElement.textContent = "connecting...";
}
isJpeg = true;
contentTypeChecked = true;
}
}
};
xhr.send();
} else if (isJpeg && contentTypeChecked) {
img.src = newUrl + "?r=" + new Date().getTime();
}
}
const img = new Image();
img.onload = function() {
if (firstLoad) {
infoDiv.style.height = "0%";
}
firstLoad = false;
old = newUrl;
feed.src = this.src;
const pixelWidth = this.naturalWidth;
const pixelHeight = this.naturalHeight;
country.textContent = "{{ country }}";
setTimeout(() => {
locationName.textContent = "{{ name|safe }}";
feed.style.width = "100%";
feed.style.height = "70%";
feed.style.opacity = "1";
infoDiv.style.height = "100%";
infoText.style.opacity = "1";
}, 100);
setTimeout(refreshImage, 500);
};
img.onerror = function(event) {
feed.style.width = "80px";
feed.style.height = "50px";
feed.src = loadingGif;
feed.style.opacity = "0.5";
infoText.style.opacity = "0%";
locationName.textContent = "{{ page_title|safe }}";
console.log("Image loading failed:", event);
const urlParams = new URLSearchParams(window.location.search);
if (urlParams.get('new') === 'false') {
countryElement.textContent = "couldn't connect.";
}
else {
window.location.href = "?new=true";
}
};
img.src = newUrl;
});
// Time count
document.addEventListener("DOMContentLoaded", function() {
const timezone = "{{ timezone }}";
setInterval(() => {
const now = new Date();
const options = {
timeZone: timezone,
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
hour12: true
};
const timeString = now.toLocaleTimeString('en-US', options);
document.getElementById("time").textContent = timeString;
}, 200);
});
// Copy link
document.addEventListener("DOMContentLoaded", function() {
const shareIcon = document.getElementById("share");
const copiedText = document.getElementById("copied");
shareIcon.addEventListener("click", function() {
const id = this.getAttribute("data-id");
const urlToCopy = `${window.location.origin}/?id=${id}`;
navigator.clipboard.writeText(urlToCopy).then(() => {
console.log("URL copied to clipboard");
shareIcon.className = "fa-solid fa-check";
//copiedText.style.visibility = "visible";
}).catch(err => {
console.log("Could not copy text: ", err);
});
});
});
// Connect vs search
document.addEventListener("DOMContentLoaded", function() {
const urlParams = new URLSearchParams(window.location.search);
const countryElement = document.getElementById("country");
if (urlParams.get('new') === 'false') {
countryElement.textContent = "connecting...";
}
});
// Fullscreen
document.addEventListener("DOMContentLoaded", function() {
const feed = document.getElementById("feed");
let isFullscreen = false;
function toggleFullScreen() {
if (!isFullscreen) {
if (this.requestFullscreen) {
this.requestFullscreen();
} else if (this.mozRequestFullScreen) {
this.mozRequestFullScreen();
} else if (this.webkitRequestFullscreen) {
this.webkitRequestFullscreen();
} else if (this.msRequestFullscreen) {
this.msRequestFullscreen();
}
} else {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
}
}
}
feed.addEventListener("click", toggleFullScreen);
feed.addEventListener("touchstart", toggleFullScreen);
document.addEventListener("fullscreenchange", function() {
isFullscreen = !isFullscreen;
});
});
// Change feed on space bar press
document.addEventListener('keydown', function(event) {
if (event.keyCode === 32) {
window.location.href = '/?new=true';
}
});
// Show more info
document.addEventListener('DOMContentLoaded', function() {
const infoText = document.getElementById('info-text');
const additionalInfo = document.getElementById('additional-info');
const showMore = document.getElementById('show-more');
const moreButton = document.getElementById('more-button');
// Initial setup
additionalInfo.style.height = '100%';
additionalInfo.style.overflow = 'hidden';
additionalInfo.style.transition = 'height 0.3s ease-in-out';
showMore.addEventListener('click', function() {
if (additionalInfo.style.height === '0px') {
const scrollHeight = additionalInfo.scrollHeight;
additionalInfo.style.height = `${scrollHeight}px`;
showMore.innerHTML = 'less <i style="margin-bottom:10px; color:var(--text-color);" id="more-button" class="fa-solid fa-caret-up"></i>';
} else {
additionalInfo.style.height = '0';
showMore.innerHTML = 'more <i style="margin-bottom:10px; color:var(--text-color);" id="more-button" class="fa-solid fa-caret-down"></i>';
}
});
});
</script>
</body>
</html> |