diff --git a/JS/main.js b/JS/main.js new file mode 100644 index 0000000..3288a14 --- /dev/null +++ b/JS/main.js @@ -0,0 +1,17 @@ +if (window.addEventListener) // W3C standard +{ + window.addEventListener('load', setFooterDate, false); +} +else if (window.attachEvent) // Microsoft +{ + window.attachEvent('onload', setFooterDate); +} + +function setFooterDate() { + var footerDate = document.getElementById("footerDate"); + let date = new Date().getFullYear(); + + footerDate.textContent = date; + + return; +} \ No newline at end of file diff --git a/JS/theme.js b/JS/theme.js index 2daa80a..90c6124 100644 --- a/JS/theme.js +++ b/JS/theme.js @@ -1,5 +1,14 @@ -window.onload = function() { - showTheme() +if (window.addEventListener) // W3C standard +{ + window.addEventListener('load', themeButtons, false); +} +else if (window.attachEvent) // Microsoft +{ + window.attachEvent('onload', themeButtons); +} + +function themeButtons() { + showTheme(); var lightButton = document.getElementById("lightTheme"); var roseButton = document.getElementById("roseTheme"); @@ -32,7 +41,6 @@ window.onload = function() { return false; } } - function swapStyleSheet(sheet) { document.getElementById("pagestyle").setAttribute("href", sheet); } diff --git a/_includes/footer.html b/_includes/footer.html index 50b9a50..0afb8a6 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -1,2 +1,2 @@
I'm planning on having examples here and some other neat stuff but I'm good at icon design not web design.
+So for now if you're interested, contact me on Discord, @NinjaCheetah#2861, or send an email to ninjacheetah@ncxprogramming.com.