diff --git a/resources/js/index.js b/resources/js/index.js index 9417a1d..3b5eb8f 100644 --- a/resources/js/index.js +++ b/resources/js/index.js @@ -17,6 +17,15 @@ document.addEventListener('DOMContentLoaded', async () => { if (ipArr.includes(config.lastConnect)) { document.querySelector('#star').src = 'icons/star_filled.svg' } + + + // Exit favorites list when clicking outside of it + window.addEventListener("click", function() { + const favList = document.querySelector('#ipList') + if (favList.style.display !== 'none') { + favList.style.display = 'none' + } + }); }) async function getFavIps() {