mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-11-16 04:45:34 +00:00
exit favorites list when clicking outside
This commit is contained in:
parent
ddca421b29
commit
6d21948c37
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user