Skip to content

Commit

Permalink
fixed lcoation of test
Browse files Browse the repository at this point in the history
  • Loading branch information
aokhader committed Jun 11, 2024
1 parent 45c4b8d commit a4b267d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
15 changes: 14 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-TC6QFDBG"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->

<header>
<nav>
<a href="speechSynth.html" title="Go to speech synthesizer">Speech Synthesizer</a>
Expand All @@ -65,6 +65,19 @@ <h2>Return of the Party Horn</h2>
<audio class="hidden" src=""></audio>
</section>
</main>

<script>
// Generate a random number between 0 and 1
const randomNumber = Math.random();
// Determine if the class should be applied
const shouldApplyClass = randomNumber < 0.5;
// Get the body element
let body = document.querySelector('body');
// Apply or remove the "blue" class based on the random number
if (shouldApplyClass) {
body.classList.add('blue');
}
</script>
</body>

</html>
12 changes: 0 additions & 12 deletions speechSynth.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,6 @@ <h2>Speech Synthesizer</h2>
<button>Press to Talk</button>
</section>
</main>
<script>
// Generate a random number between 0 and 1
const randomNumber = Math.random();
// Determine if the class should be applied
const shouldApplyClass = randomNumber < 0.5;
// Get the body element
let body = document.querySelector('body');
// Apply or remove the "blue" class based on the random number
if (shouldApplyClass) {
body.classList.add('blue');
}
</script>
</body>

</html>

0 comments on commit a4b267d

Please sign in to comment.