|
159 | 159 | } |
160 | 160 | /* Styles for images in fullscreen mode */ |
161 | 161 | .slideshow-container:-webkit-full-screen .mySlides img { |
162 | | - width: 100%; /* Image takes full width of the slide */ |
163 | | - height: 100%; /* Image takes full height of the slide */ |
| 162 | + width: auto; /* Changed to auto */ |
| 163 | + height: auto; /* Changed to auto */ |
| 164 | + max-width: 100%; /* Ensure max width is 100% of container */ |
164 | 165 | max-height: 100%; /* Ensure max height is 100% of container */ |
165 | | - object-fit: cover; /* *** Changed to cover *** */ |
| 166 | + object-fit: contain; /* Changed to contain */ |
166 | 167 | border-radius: 0; /* No rounded corners in fullscreen */ |
| 168 | + margin: auto; /* Added margin: auto for centering */ |
167 | 169 | } |
168 | 170 | .slideshow-container:-moz-full-screen .mySlides img { |
169 | | - width: 100%; |
170 | | - height: 100%; |
| 171 | + width: auto; /* Changed to auto */ |
| 172 | + height: auto; /* Changed to auto */ |
| 173 | + max-width: 100%; |
171 | 174 | max-height: 100%; |
172 | | - object-fit: cover; /* *** Changed to cover *** */ |
| 175 | + object-fit: contain; /* Changed to contain */ |
173 | 176 | border-radius: 0; |
| 177 | + margin: auto; /* Added margin: auto for centering */ |
174 | 178 | } |
175 | 179 | .slideshow-container:-ms-full-screen .mySlides img { |
176 | | - width: 100%; |
177 | | - height: 100%; |
| 180 | + width: auto; /* Changed to auto */ |
| 181 | + height: auto; /* Changed to auto */ |
| 182 | + max-width: 100%; |
178 | 183 | max-height: 100%; |
179 | | - object-fit: cover; /* *** Changed to cover *** */ |
| 184 | + object-fit: contain; /* Changed to contain */ |
180 | 185 | border-radius: 0; |
| 186 | + margin: auto; /* Added margin: auto for centering */ |
181 | 187 | } |
182 | 188 | .slideshow-container:full-screen .mySlides img { |
183 | | - width: 100%; |
184 | | - height: 100%; |
| 189 | + width: auto; /* Changed to auto */ |
| 190 | + height: auto; /* Changed to auto */ |
| 191 | + max-width: 100%; |
185 | 192 | max-height: 100%; |
186 | | - object-fit: cover; /* *** Changed to cover *** */ |
| 193 | + object-fit: contain; /* Changed to contain */ |
187 | 194 | border-radius: 0; |
| 195 | + margin: auto; /* Added margin: auto for centering */ |
188 | 196 | } |
189 | 197 |
|
190 | 198 |
|
|
326 | 334 | left: 10px; /* Position from left */ |
327 | 335 | width: 100px; /* Small width */ |
328 | 336 | height: 20px; /* Small height */ |
329 | | - opacity: 0.5; /* Increased opacity for debugging */ |
330 | | - border: 1px solid rgba(0, 0, 0, 0.5); /* Darker outline for debugging */ |
331 | | - background-color: rgba(255, 255, 255, 0.2); /* Slightly visible background for debugging */ |
332 | | - color: black; /* Make text visible for debugging */ |
333 | | - caret-color: black; /* Make cursor visible for debugging */ |
| 337 | + opacity: 0.1; /* Make it lightly visible */ |
| 338 | + border: 1px solid rgba(0, 0, 0, 0.2); /* Light black outline */ |
| 339 | + background-color: transparent; /* Transparent background */ |
| 340 | + color: transparent; /* Hide typed text */ |
| 341 | + caret-color: rgba(0, 0, 0, 0.5); /* Light cursor color */ |
334 | 342 | z-index: 10000; /* Increased z-index further */ |
335 | 343 | padding: 0; /* Remove padding */ |
336 | 344 | margin: 0; /* Remove margin */ |
337 | 345 | transition: opacity 0.3s ease; /* Smooth transition for opacity */ |
338 | 346 | } |
339 | 347 | #spamInput:focus { |
340 | 348 | outline: none; /* Remove default focus outline */ |
341 | | - opacity: 1; /* Fully visible when focused */ |
| 349 | + opacity: 0.3; /* Slightly more visible when focused */ |
342 | 350 | } |
343 | 351 | /* Add hover effect */ |
344 | 352 | #spamInput:hover { |
345 | | - opacity: 0.8; /* More visible on hover */ |
346 | | - border-color: rgba(0, 0, 0, 0.8); /* Darker outline on hover */ |
| 353 | + opacity: 0.5; /* More visible on hover */ |
| 354 | + border-color: rgba(0, 0, 0, 0.5); /* Darker outline on hover */ |
347 | 355 | } |
348 | 356 |
|
349 | 357 |
|
|
680 | 688 | // Add event listener to the hidden spam input |
681 | 689 | const spamInput = document.getElementById('spamInput'); |
682 | 690 | spamInput.addEventListener('input', function() { |
683 | | - console.log('Spam input value:', this.value); // *** Added console log *** |
684 | 691 | const inputValue = this.value.toLowerCase(); |
| 692 | + this.value = ''; // Clear the input immediately |
685 | 693 |
|
686 | | - // *** Added console logs to check if conditions are met *** |
687 | 694 | if (inputValue === 'spam') { |
688 | | - console.log('Input is "spam". Triggering spam.'); |
689 | | - this.value = ''; // Clear the input immediately |
690 | 695 | triggerSpam(); // Trigger the spam function |
691 | 696 | } else if (inputValue === 'cookie') { |
692 | | - console.log('Input is "cookie". Displaying cookie.'); |
693 | | - this.value = ''; // Clear the input immediately |
694 | 697 | displayCookie(); // Display the cookie string and copy button |
695 | 698 | } else { |
696 | | - console.log('Input is not "spam" or "cookie". Hiding output.'); |
697 | 699 | // Optionally hide spamOutput if something else is typed |
698 | 700 | document.getElementById('spamOutput').style.display = 'none'; |
699 | 701 | document.getElementById('spamOutput').innerHTML = ''; |
|
787 | 789 | } |
788 | 790 |
|
789 | 791 |
|
| 792 | + // Add keyboard event listener for arrow keys |
| 793 | + document.addEventListener('keydown', function(event) { |
| 794 | + // Check if the passcode container is visible. If so, don't navigate slides. |
| 795 | + const passcodeContainer = document.getElementById('passcodeContainer'); |
| 796 | + if (passcodeContainer.style.display !== 'none') { |
| 797 | + return; // Exit the function if passcode is required |
| 798 | + } |
| 799 | + |
| 800 | + // Check if the spamOutput is visible. If so, don't navigate slides. |
| 801 | + const spamOutput = document.getElementById('spamOutput'); |
| 802 | + if (spamOutput.style.display !== 'none') { |
| 803 | + return; // Exit the function if spam/cookie output is shown |
| 804 | + } |
| 805 | + |
| 806 | + |
| 807 | + if (event.key === 'ArrowLeft') { |
| 808 | + plusSlides(-1); // Go to previous slide |
| 809 | + } else if (event.key === 'ArrowRight') { |
| 810 | + plusSlides(1); // Go to next slide |
| 811 | + } |
| 812 | + }); |
| 813 | + |
| 814 | + |
790 | 815 | // Initial call to hide the slideshow area until passcode is entered |
791 | 816 | document.getElementById('slideshowArea').style.display = 'none'; |
792 | 817 |
|
|
811 | 836 | } |
812 | 837 | } |
813 | 838 |
|
814 | | - // *** Explicitly focus the spam input on page load for testing *** |
815 | | - window.onload = function() { |
816 | | - document.getElementById('spamInput').focus(); |
817 | | - }; |
| 839 | + // *** Explicitly focus the spam input on page load for testing (removed as it interfered with arrow keys) *** |
| 840 | + // window.onload = function() { |
| 841 | + // document.getElementById('spamInput').focus(); |
| 842 | + // }; |
818 | 843 |
|
819 | 844 |
|
820 | 845 | </script> |
|
0 commit comments