You've already forked Tricky-Addon-Update-Target-List
mirror of
https://github.com/KOWX712/Tricky-Addon-Update-Target-List.git
synced 2025-09-06 06:37:09 +00:00
fix: remove no scroll after selecting custom kb
This commit is contained in:
@@ -320,7 +320,7 @@ async function listFiles(path, skipAnimation = false) {
|
|||||||
const source = await execCommand(`cat "${item.path}"`);
|
const source = await execCommand(`cat "${item.path}"`);
|
||||||
const result = await setKeybox(source);
|
const result = await setKeybox(source);
|
||||||
if (result) {
|
if (result) {
|
||||||
fileSelector.style.display = 'none';
|
closeCustomKeyboxSelector();
|
||||||
showPrompt('prompt.custom_key_set');
|
showPrompt('prompt.custom_key_set');
|
||||||
} else {
|
} else {
|
||||||
showPrompt('prompt.custom_key_set_error');
|
showPrompt('prompt.custom_key_set_error');
|
||||||
@@ -384,21 +384,22 @@ document.querySelector('.back-button').addEventListener('click', async () => {
|
|||||||
|
|
||||||
// Close custom keybox selector
|
// Close custom keybox selector
|
||||||
document.querySelector('.close-selector').addEventListener('click', () => {
|
document.querySelector('.close-selector').addEventListener('click', () => {
|
||||||
|
closeCustomKeyboxSelector();
|
||||||
|
});
|
||||||
|
fileSelector.addEventListener('click', (event) => {
|
||||||
|
if (event.target === fileSelector) {
|
||||||
|
closeCustomKeyboxSelector();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Function to close custom keybox selector
|
||||||
|
function closeCustomKeyboxSelector() {
|
||||||
fileSelector.style.opacity = '0';
|
fileSelector.style.opacity = '0';
|
||||||
document.body.classList.remove("no-scroll");
|
document.body.classList.remove("no-scroll");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
fileSelector.style.display = 'none';
|
fileSelector.style.display = 'none';
|
||||||
}, 300);
|
}, 300);
|
||||||
});
|
}
|
||||||
fileSelector.addEventListener('click', (event) => {
|
|
||||||
if (event.target === fileSelector) {
|
|
||||||
fileSelector.style.opacity = '0';
|
|
||||||
document.body.classList.remove("no-scroll");
|
|
||||||
setTimeout(() => {
|
|
||||||
fileSelector.style.display = 'none';
|
|
||||||
}, 300);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Open custom keybox selector
|
// Open custom keybox selector
|
||||||
document.getElementById('customkb').addEventListener('click', async () => {
|
document.getElementById('customkb').addEventListener('click', async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user