Skip to content

Commit

Permalink
Merge pull request vishanurag#968 from fluid111/code-display-fix
Browse files Browse the repository at this point in the history
Code display fix
  • Loading branch information
vishanurag authored Oct 27, 2024
2 parents 01d998e + 62137ce commit 52162e2
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 35 deletions.
47 changes: 12 additions & 35 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1492,6 +1492,7 @@ <h3>Thank You!</h3>
// Start the animation
animateCircles();
</script>

<script>

//Cannot redeclare block-scoped variable 'darkModeToggle'
Expand Down Expand Up @@ -1519,6 +1520,7 @@ <h3>Thank You!</h3>
if (localStorage.getItem('darkMode') === 'enabled') {
enableDarkMode();
}

<script>
// Get the button
var mybutton = document.getElementById("goToTopBtn");
Expand All @@ -1530,8 +1532,7 @@ <h3>Thank You!</h3>
domain: "www.chatbase.co"
} -->
</script>
<script src="https://www.chatbase.co/embed.min.js" chatbotId="X6k1f9B5oxQr2T4-NzVxG" domain="www.chatbase.co" defer>
</script>
<script src="https://www.chatbase.co/embed.min.js" chatbotId="X6k1f9B5oxQr2T4-NzVxG" domain="www.chatbase.co" defer></script>

<script src="src/Scripts/Save.js"></script>
<script>
Expand Down Expand Up @@ -1565,64 +1566,40 @@ <h3>Thank You!</h3>

</body>

// When the user scrolls down 20px from the top of the document, show the button
window.onscroll = function () {
scrollFunction();
};
function scrollFunction() {
if (
document.body.scrollTop > 20 ||
document.documentElement.scrollTop > 20
) {
mybutton.style.display = "block";
} else {
mybutton.style.display = "none";
}
}


// When the user clicks on the button, scroll to the top of the document
function goToTop() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
</script>

<script>

window.addEventListener('scroll', function () {
const winScroll = document.body.scrollTop || document.documentElement.scrollTop;
const height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
const scrolled = (winScroll / height) * 100;
document.getElementById('progress-bar').style.width = scrolled + '%';
});
</script>

<script>
window.embeddedChatbotConfig = {
chatbotId: "X6k1f9B5oxQr2T4-NzVxG",
domain: "www.chatbase.co"
}
</script>
<script src="https://www.chatbase.co/embed.min.js" chatbotId="X6k1f9B5oxQr2T4-NzVxG" domain="www.chatbase.co" defer>
domain: "www.chatbase.co"
}
</script>
<script src="https://www.chatbase.co/embed.min.js" chatbotId="X6k1f9B5oxQr2T4-NzVxG" domain="www.chatbase.co" defer></script>

<script>
// Get the button
var mybutton = document.getElementById("goToTopBtn");

// When the user scrolls down 20px from the top of the document, show the button
window.onscroll = function () {
scrollFunction();
};
};

function scrollFunction() {
if (
document.body.scrollTop > 20 ||
document.documentElement.scrollTop > 20
) {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20 ) {
mybutton.style.display = "block";
} else {
mybutton.style.display = "none";
}
}
}

// When the user clicks on the button, scroll to the top of the document
function goToTop() {
Expand Down
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "canvas-editor",
"version": "1.0.0",
"description": "<div align=\"center\">",
"main": "visi.js",
"scripts": {
"start": "node visi.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}

0 comments on commit 52162e2

Please sign in to comment.