Loading external Javascript files into website through Footer code

Hello,

I have followed all instructions on How to embed files hosted on Github - #34 by extrasol and have included this in the Footer Code at site level: <script src="https://cdn.jsdelivr.net/gh/Silvan33y/96c364267dc47d46ab92ca5b4dc7ede6/raw/d0da1e2cc59d264c23709af059ef51785ac36ab9/darkmode-jquery.min.js"></script>

And this is the raw link: https://gist.githubusercontent.com/Silvan33y/96c364267dc47d46ab92ca5b4dc7ede6/raw/d0da1e2cc59d264c23709af059ef51785ac36ab9/darkmode-jquery.min.js

But it doesn’t load the dark mode function on my website: https://silvansoeters.webflow.io/

I have checked with this tool Migrate from GitHub to jsDelivr the raw Github Gist link and I get this notification:

So I just now made a repo on github instead of a gist and changed the code to <script src="https://cdn.jsdelivr.net/gh/Silvan33y/Dark-Mode@main/full-functionality.min.js"></script> because this link does work with jsdelivr.

But still, nothing. Both links/files seem to get a 404 notification. So they are not even loaded properly so this is where the problem resides.

So are there any alternatives of uploading and getting javascript files or am I doing something wrong?

Thank you.

UPDATE: None of these links seem to work. I’m completely lost as most links do display the code in the browser.


Here is my site site Published: LINK

Yay! I got it working. It seemed that I included tags into my min.js file and you shouldn’t. I’m a real javascript newbie so yea that’s what gave an error into my code. Btw, Gist from Github don’t seem to work anymore as well. So I just included the file from my Github repository.