close button

This commit is contained in:
SpikeHD 2022-04-21 15:33:14 -07:00
parent 107a650e54
commit 7707a067c7
3 changed files with 25 additions and 1 deletions

View File

@ -8,8 +8,11 @@
<script src="js/index.js"></script>
</head>
<body>
<div id="settingsPanel">
<div id="settingsPanel" style="display: none;">
<span id="fullSettingsTitle">Settings</span>
<div id="settingsClose">
<img src="icons/close.svg" onclick="closeSettings()" />
</div>
<div id="settingsPanelInner">
<div class="settingTitle">
<span>Scripts</span>

View File

@ -313,6 +313,12 @@ async function openSettings() {
killSwitch.checked = config.enableKillswitch
}
async function closeSettings() {
const settings = document.querySelector('#settingsPanel')
settings.style.display = 'none'
}
async function toggleKillSwitch() {
const killSwitch = document.querySelector('#killswitchOption')
const config = await getCfg()

View File

@ -66,6 +66,21 @@ body {
font-weight: normal;
}
#settingsClose {
display: inline-block;
margin-left: 65%;
transition: filter 0.1s ease-in-out;
}
#settingsClose img {
height: 20px;
}
#settingsClose:hover {
filter: invert(85%) sepia(31%) saturate(560%) hue-rotate(329deg) brightness(100%) contrast(92%);
cursor: pointer;
}
#ipList {
position: absolute;
z-index: 99;