Skip to content

Commit

Permalink
Switched from JS to TS and fixed embed title.
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottN13 committed Jul 31, 2024
1 parent b8393ee commit fee55b2
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
21 changes: 1 addition & 20 deletions assets/index.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
/* When the user clicks on the button,
toggle between hiding and showing the dropdown content */
function newsDropdown() {
document.getElementById("news").classList.toggle("show");
}

// Close the dropdown menu if the user clicks outside of it
window.onclick = function(event) {
if (!event.target.matches('dropdownbtn')) {
var dropdowns = document.getElementById("news-content");
var i;
for (i = 0; i < dropdowns.length; i++) {
var openDropdown = dropdowns[i];
if (openDropdown.classList.contains('show')) {
openDropdown.classList.remove('show');
}
}
}
}

// Webamp attempts.
/*
webamp.setTracksToPlay([
{url: 'https://www.youtube.com/watch?v=e0T0rI-GiR4&list=PL7IgabZ8nkx39Pl2SEMXTGfMnF8PwIYQo&index=17'},
Expand Down
19 changes: 19 additions & 0 deletions assets/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* When the user clicks on the button,
toggle between hiding and showing the dropdown content */
function newsDropdown() {
document.getElementById("news").classList.toggle("show");
}

// Close the dropdown menu if the user clicks outside of it
window.onclick = function(event) {
if (!event.target.matches('dropdownbtn')) {
var dropdowns = document.getElementById("news-content");
var i;
for (i = 0; i < dropdowns.length; i++) {
var openDropdown = dropdowns[i];
if (openDropdown.classList.contains('show')) {
openDropdown.classList.remove('show');
}
}
}
}
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<!--webamp-->
<script src="https://unpkg.com/[email protected]/built/webamp.bundle.min.js"></script>
<!--Discord Share Link Embed-->
<meta content="Embed Title" property="og:title" />
<meta content="Home | scottnewman.xyz" property="og:title" />
<meta content="website used for funny" property="og:description" />
<meta content="https://www.scottnewman.xyz" property="og:url" />
<meta content="https://avatars.githubusercontent.com/u/87974560?v=4" property="og:image" />
Expand Down
Empty file added test.rb
Empty file.

0 comments on commit fee55b2

Please sign in to comment.