mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-08-14 13:11:48 +08: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)) {
|
if (ipArr.includes(config.lastConnect)) {
|
||||||
document.querySelector('#star').src = 'icons/star_filled.svg'
|
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() {
|
async function getFavIps() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user