Compare commits
43 Commits
@ -1,2 +1,3 @@ |
||||
node_modules/ |
||||
out/ |
||||
out/ |
||||
favorites.json |
@ -0,0 +1 @@ |
||||
{"log":{"Context Menu":["The right click menu now recognizes when you're on a folder","The 'rename' feature in context menu works!"],"Sidebar":["Added the custom favorites group","Doesn't work yet though"]},"version":{"name":"Alpha","semver":"1.6.0"}} |
@ -0,0 +1 @@ |
||||
{"log":{"Toasts":["Toasts now pause when you hover over them","This feature is somewhat experimental","Changed the internals of toasts. More butter. Mmmmmmbutter"]},"version":{"name":"Alpha","semver":"1.6.1"}} |
@ -0,0 +1 @@ |
||||
{"log":{"Sidebar":["The option to pin a folder to the sidebar now works","These pins save between restarts!"]},"version":{"name":"Alpha","semver":"1.6.2"}} |
@ -0,0 +1 @@ |
||||
{"log":{"Folder Deletion":["You can now delete folders by right clicking on them","Includes an obligatory confirmation to make sure you're sure you want to delete the folder :)"],"Bugs":["Error modals are actually closable now kekw","Right click will only show folder options on folders now"]},"version":{"name":"Alpha","semver":" 1.6.3"}} |
@ -0,0 +1 @@ |
||||
{"log":{"Misc":["Small update here","Cleaned up a few bugs too small to really talk about here","Fixed a really nasty bug where the app would try to delete a folder a whole bunch of times","Clicking on the same file again won't make it visibly un-click","A folder will select itself after it's created"]},"version":{"name":"Alpha","semver":"1.6.4"}} |
@ -0,0 +1 @@ |
||||
{"log":{"File opening":["Files now open!!","I know right, a file explorer that opens files. Revolutionary.","This feature is dependent on you being on a version of Windows where PowerShell exists. Whether or not it works every single time is a bit untested, so it could cause some twitchy stuff to happen. This has not been written for Linux or Mac yet."]},"version":{"name":"Alpha","semver":"1.7.0"}} |
@ -0,0 +1 @@ |
||||
{"log":{"Zipping":["You can now zip folders!","So far, this only applies to the directory you're currently viewing. It will not *yet* zip the directory you have selected"]},"version":{"name":"Alpha","semver":"1.7.1"}} |
@ -0,0 +1,5 @@ |
||||
const path = require('path'); |
||||
|
||||
module.exports = () => { |
||||
return require('./compress')(undefined, path.join(window.kade.cpath, window.kade.currentFolder)); |
||||
}; |
@ -0,0 +1,105 @@ |
||||
const fs = require('fs'); |
||||
const path = require('path'); |
||||
const az = require('adm-zip'); |
||||
const Mousetrap = require('../dep/mousetrap'); |
||||
|
||||
const lightRefresh = require('../fileview/lightrefresh'); |
||||
const preModal = require('../modal/pre'); |
||||
const postModal = require('../modal/post'); |
||||
const showError = require('../modal/common/error'); |
||||
const clearModals = require('../modal/clearmodals'); |
||||
const newToast = require('../toast/createtoast'); |
||||
const refresh = require('../fileview/refresh'); |
||||
|
||||
module.exports = (event, pathToCompress) => { |
||||
let zip = new az(); |
||||
if (!pathToCompress) {pathToCompress = window.kade.cpath;} |
||||
if (window.kade.modal) {return;} |
||||
preModal('compress-folder-modal-container'); |
||||
let modalOut = document.createElement('div'); |
||||
modalOut.className = 'modal'; |
||||
modalOut.id = 'compress-folder-modal-container'; |
||||
document.body.appendChild(modalOut); |
||||
let modal = document.createElement('div'); |
||||
modal.className = 'modal-wrapper'; |
||||
modalOut.appendChild(modal); |
||||
let title = document.createElement('h2'); |
||||
title.innerHTML = 'Compress Folder'; |
||||
modal.appendChild(title); |
||||
let text = document.createElement('p'); |
||||
text.innerHTML = "Please name the zip you'd like to compress to."; |
||||
modal.appendChild(text); |
||||
let cont = document.createElement('div'); |
||||
cont.className = 'button-container'; |
||||
modal.appendChild(cont); |
||||
let input = document.createElement('input'); |
||||
input.placeholder = pathToCompress.split(/\\+|\/+/gm).reverse()[0]; |
||||
input.value = input.placeholder; |
||||
input.id = 'compress-folder-input'; |
||||
let lastIn = ''; |
||||
input.oninput = () => { |
||||
if (!input.value.match(/^[a-zA-Z0-9-_() ]*$/gm)) {input.value = lastIn;} |
||||
else {lastIn = input.value;} |
||||
}; |
||||
cont.appendChild(input); |
||||
let conf = document.createElement('button'); |
||||
conf.innerHTML = 'Create'; |
||||
conf.onclick = () => { |
||||
try { |
||||
input.value = input.value.trim(); |
||||
if (input.value.endsWith('.zip')) {input.value = input.value.slice(0, input.value.length - 4);} |
||||
if (!input.value.length) {return;} |
||||
if (fs.existsSync(path.join(window.kade.cpath, `${input.value}.zip`))) { |
||||
if (!input.value.match(/^.+\(\d\)$/gm)) {input.value += ' (1)';} |
||||
else { |
||||
let tempstr = input.value.split(''); |
||||
tempstr[input.value.length - 2] = `${Number(input.value.charAt(input.value.length - 2)) + 1}`; |
||||
input.value = tempstr.join(''); |
||||
} |
||||
return; |
||||
} |
||||
input.style.display = 'none'; |
||||
conf.style.display = 'none'; |
||||
cont.style.display = 'none'; |
||||
text.innerHTML = "Please wait a moment..."; |
||||
closeWrap.style.display = 'none'; |
||||
zip.addLocalFolderPromise(pathToCompress).then(() => { |
||||
title.innerHTML += " - In Progress..." |
||||
text.innerHTML = "Your folder is being compressed. Please wait a moment.<br><br>This may take some time..."; |
||||
let bar = document.createElement('div'); |
||||
bar.className = "loading-bar"; |
||||
modal.appendChild(bar); |
||||
zip.writeZipPromise(`${window.kade.cpath}/${input.value}${input.value.endsWith('.zip') ? '' : '.zip'}`, {overwrite: true}).then(() => { |
||||
newToast("Folder compressed", [`The current folder was compressed into "${input.value}" successfully`, `<em>${window.kade.cpath}/${input.value}</em>`], undefined, false, 5); |
||||
lightRefresh(); |
||||
modalOut.remove(); |
||||
postModal(modalOut.id); |
||||
}); |
||||
}); |
||||
} catch { |
||||
newToast("Folder not Compressed", "An error caused that folder to not be compressed.", "#b24355", false, 5, () => {showError("Folder Creation", "There was an unknown error while trying to compress that folder. It may be a permissions issue, or the host folder doesn't exist anymore.");}); |
||||
clearModals(); |
||||
postModal(modalOut.id); |
||||
} |
||||
}; |
||||
cont.appendChild(conf); |
||||
input.focus(); |
||||
let msm = new Mousetrap(modal); |
||||
msm.bind('esc', () => { |
||||
lightRefresh(); |
||||
modalOut.remove(); |
||||
postModal(modalOut.id); |
||||
}); |
||||
msm.bind('enter', () => {conf.click();}); |
||||
let close = document.createElement('a'); |
||||
close.className = 'close-button'; |
||||
close.onclick = () => { |
||||
lightRefresh(); |
||||
modalOut.remove(); |
||||
postModal(modalOut.id); |
||||
}; |
||||
let closeWrap = document.createElement('div'); |
||||
closeWrap.className = 'close-button-wrapper'; |
||||
modal.appendChild(closeWrap); |
||||
closeWrap.appendChild(close); |
||||
}; |
@ -0,0 +1,105 @@ |
||||
const fs = require('fs'); |
||||
const path = require('path'); |
||||
const az = require('adm-zip'); |
||||
const Mousetrap = require('../dep/mousetrap'); |
||||
|
||||
const lightRefresh = require('../fileview/lightrefresh'); |
||||
const preModal = require('../modal/pre'); |
||||
const postModal = require('../modal/post'); |
||||
const showError = require('../modal/common/error'); |
||||
const clearModals = require('../modal/clearmodals'); |
||||
const newToast = require('../toast/createtoast'); |
||||
const refresh = require('../fileview/refresh'); |
||||
|
||||
module.exports = (event, pathToCompress) => { |
||||
if (!fs.existsSync(path.join(window.kade.cpath, window.kade.currentFolder))) { |
||||
return newToast("Decompression failed", "For some reason, that zip archive could not be found."); |
||||
} |
||||
let zip = new az(path.join(window.kade.cpath, window.kade.currentFolder)); |
||||
if (!pathToCompress) {pathToCompress = window.kade.currentFolder;} |
||||
if (window.kade.modal) {return;} |
||||
preModal('decompress-folder-modal-container'); |
||||
let modalOut = document.createElement('div'); |
||||
modalOut.className = 'modal'; |
||||
modalOut.id = 'decompress-folder-modal-container'; |
||||
document.body.appendChild(modalOut); |
||||
let modal = document.createElement('div'); |
||||
modal.className = 'modal-wrapper'; |
||||
modalOut.appendChild(modal); |
||||
let title = document.createElement('h2'); |
||||
title.innerHTML = 'Decompress Archive'; |
||||
modal.appendChild(title); |
||||
let text = document.createElement('p'); |
||||
text.innerHTML = "Please name the zip you'd like to decompress to."; |
||||
modal.appendChild(text); |
||||
let cont = document.createElement('div'); |
||||
cont.className = 'button-container'; |
||||
modal.appendChild(cont); |
||||
let input = document.createElement('input'); |
||||
input.placeholder = pathToCompress.split(/\\+|\/+/gm).reverse()[0]; |
||||
input.placeholder = input.placeholder.slice(0, input.placeholder.length - 4); |
||||
input.value = input.placeholder; |
||||
input.id = 'decompress-folder-input'; |
||||
let lastIn = ''; |
||||
input.oninput = () => { |
||||
if (!input.value.match(/^[a-zA-Z0-9-_() ]*$/gm)) {input.value = lastIn;} |
||||
else {lastIn = input.value;} |
||||
}; |
||||
cont.appendChild(input); |
||||
let conf = document.createElement('button'); |
||||
conf.innerHTML = 'Create'; |
||||
conf.onclick = () => { |
||||
try { |
||||
input.value = input.value.trim(); |
||||
if (!input.value.length) {return;} |
||||
if (fs.existsSync(path.join(window.kade.cpath, input.value))) { |
||||
if (!input.value.match(/^.+\(\d\)$/gm)) {input.value += ' (1)';} |
||||
else { |
||||
let tempstr = input.value.split(''); |
||||
tempstr[input.value.length - 2] = `${Number(input.value.charAt(input.value.length - 2)) + 1}`; |
||||
input.value = tempstr.join(''); |
||||
} |
||||
return; |
||||
} |
||||
input.style.display = 'none'; |
||||
conf.style.display = 'none'; |
||||
cont.style.display = 'none'; |
||||
closeWrap.style.display = 'none'; |
||||
title.innerHTML += " - In Progress..." |
||||
text.innerHTML = "Your arhive is being decompressed. Please wait a moment.<br><br>This may take some time..."; |
||||
let bar = document.createElement('div'); |
||||
bar.className = "loading-bar"; |
||||
modal.appendChild(bar); |
||||
zip.extractAllToAsync(path.join(window.kade.cpath, input.value), undefined, undefined, () => { |
||||
newToast("Archive decompressed", [`The current folder was decompressed into "${input.value}" successfully`, `<em>${window.kade.cpath}/${input.value}</em>`], undefined, false, 5, () => refresh(`${window.kade.cpath}/${input.value}`)); |
||||
lightRefresh(); |
||||
modalOut.remove(); |
||||
postModal(modalOut.id); |
||||
}); |
||||
} catch { |
||||
newToast("Archive not Decompressed", "An error caused that folder to not be decompressed.", "#b24355", false, 5, () => {showError("Folder Creation", "There was an unknown error while trying to decompress that folder. It may be a permissions issue, or the host folder doesn't exist anymore.");}); |
||||
clearModals(); |
||||
postModal(modalOut.id); |
||||
} |
||||
}; |
||||
cont.appendChild(conf); |
||||
input.focus(); |
||||
let msm = new Mousetrap(modal); |
||||
msm.bind('esc', () => { |
||||
lightRefresh(); |
||||
modalOut.remove(); |
||||
postModal(modalOut.id); |
||||
}); |
||||
msm.bind('enter', () => {conf.click();}); |
||||
let close = document.createElement('a'); |
||||
close.className = 'close-button'; |
||||
close.onclick = () => { |
||||
lightRefresh(); |
||||
modalOut.remove(); |
||||
postModal(modalOut.id); |
||||
}; |
||||
let closeWrap = document.createElement('div'); |
||||
closeWrap.className = 'close-button-wrapper'; |
||||
modal.appendChild(closeWrap); |
||||
closeWrap.appendChild(close); |
||||
}; |
@ -0,0 +1,79 @@ |
||||
const fs = require('fs'); |
||||
const path = require('path'); |
||||
const Mousetrap = require('../dep/mousetrap'); |
||||
|
||||
const lightRefresh = require('../fileview/lightrefresh'); |
||||
const preModal = require('../modal/pre'); |
||||
const postModal = require('../modal/post'); |
||||
const showError = require('../modal/common/error'); |
||||
const clearModals = require('../modal/clearmodals'); |
||||
const newToast = require('../toast/createtoast'); |
||||
|
||||
module.exports = () => { |
||||
if (window.kade.modal) {return;} |
||||
preModal('delete-folder-modal-container'); |
||||
let modalOut = document.createElement('div'); |
||||
modalOut.className = 'modal'; |
||||
modalOut.id = 'delete-folder-modal-container'; |
||||
document.body.appendChild(modalOut); |
||||
let modal = document.createElement('div'); |
||||
modal.className = 'modal-wrapper'; |
||||
modalOut.appendChild(modal); |
||||
let title = document.createElement('h2'); |
||||
title.innerHTML = 'Delete Folder'; |
||||
modal.appendChild(title); |
||||
let text = document.createElement('p'); |
||||
text.innerHTML = "Are you sure you'd like to delete this folder? Remember, this <b>cannot be undone</b>."; |
||||
modal.appendChild(text); |
||||
let cont = document.createElement('div'); |
||||
cont.className = 'button-container'; |
||||
modal.appendChild(cont); |
||||
let conf = document.createElement('button'); |
||||
conf.innerHTML = 'Delete it!'; |
||||
let cxl = document.createElement('button'); |
||||
cxl.innerHTML = "Nevermind"; |
||||
cxl.onclick = () => { |
||||
lightRefresh(); |
||||
modalOut.remove(); |
||||
postModal(modalOut.id); |
||||
}; |
||||
conf.onclick = () => { |
||||
try { |
||||
fs.rmdirSync(path.join(window.kade.cpath, window.kade.currentFolder)); |
||||
postModal(modalOut.id); |
||||
modalOut.remove(); |
||||
lightRefresh(window.kade.cpath); |
||||
newToast("Folder Deleted", "Your folder has been deleted successfully."); |
||||
} catch { |
||||
newToast("Folder not Deleted", "An error caused that folder to not be deleted.", "#b24355", false, 5, () => {showError("Folder Deletion", "There was an unknown error while trying to delete that folder. It may be a permissions issue, or the host folder doesn't exist anymore.");}); |
||||
clearModals(); |
||||
try {modalOut.remove();} catch {} |
||||
postModal(modalOut.id); |
||||
} |
||||
}; |
||||
cont.appendChild(conf); |
||||
cont.appendChild(cxl); |
||||
let iin = document.createElement('input'); |
||||
iin.className = 'invis'; |
||||
iin.classList.add('nosel'); |
||||
cont.appendChild(iin); |
||||
iin.focus(); |
||||
let msm = new Mousetrap(modal); |
||||
msm.bind('esc', () => { |
||||
lightRefresh(); |
||||
modalOut.remove(); |
||||
postModal(modalOut.id); |
||||
}); |
||||
msm.bind('enter', () => {conf.click();}); |
||||
let close = document.createElement('a'); |
||||
close.className = 'close-button'; |
||||
close.onclick = () => { |
||||
lightRefresh(); |
||||
modalOut.remove(); |
||||
postModal(modalOut.id); |
||||
}; |
||||
let closeWrap = document.createElement('div'); |
||||
closeWrap.className = 'close-button-wrapper'; |
||||
modal.appendChild(closeWrap); |
||||
closeWrap.appendChild(close); |
||||
}; |
@ -1,4 +1,5 @@ |
||||
module.exports = (window) => { |
||||
document.getElementById('ctx').style.display = 'none'; |
||||
if (!window) {return;} |
||||
window.kade.context = false; |
||||
}; |
@ -0,0 +1,36 @@ |
||||
const fs = require('fs'); |
||||
const path = require('path'); |
||||
|
||||
const createToast = require('../toast/createtoast'); |
||||
const refresh = require('../fileview/refresh'); |
||||
const newToast = require("../toast/createtoast"); |
||||
|
||||
module.exports = () => { |
||||
if (!fs.existsSync(path.join(__dirname, '../../', '/json/config'))) {fs.mkdirSync(path.join(__dirname, '../../', '/json/config'));} |
||||
let pins; |
||||
if (fs.existsSync(path.join(__dirname, '../../', '/json/config/favorites.json'))) { |
||||
pins = require('../../json/config/favorites.json'); |
||||
} else {pins = {};} |
||||
let fta = window.kade.currentFolder.trim(); |
||||
if (Object.keys(pins).includes(`${window.kade.cpath.replace(/\\+/gm, '/')}/${fta}`)) { |
||||
return createToast("Already pinned", "That folder is already pinned!"); |
||||
} |
||||
let tr = `${window.kade.cpath.replace(/\\+/gm, '/')}/${fta}`; |
||||
pins[tr] = fta; |
||||
let cfc = document.getElementById('custom-favorites-container'); |
||||
let fav = document.createElement('div'); |
||||
['favorites-button', 'folder-pin', 'nosel'].forEach(x => fav.classList.add(x)); |
||||
fav.innerHTML = fta; |
||||
fav.onclick = () => {refresh(tr);}; |
||||
cfc.appendChild(fav); |
||||
createToast( |
||||
"Folder Pinned", [`Folder "${fta}" was successfully pinned! You can now access it permanently in your sidebar!"`, `<em>${window.kade.cpath.replace(/\\+/gm, '/')}/${fta}</em>`], undefined, false, 5, |
||||
() => { |
||||
refresh(tr); |
||||
require('electron').clipboard.writeText(`${window.kade.cpath.replace(/\\+/gm, '/')}`); |
||||
newToast("Copied!", "<em>The folder's path has been copied to your clipboard.</em>", "#19df46"); |
||||
} |
||||
); |
||||
try {fs.writeFileSync(path.join(__dirname, '../../', '/json/config/favorites.json'), JSON.stringify(pins));} |
||||
catch {createToast("Error", "Your pin was not saved for some reason. Please restart or reload (ctrl+shift+r) the app and try again.", "#ff557a");} |
||||
}; |
@ -1,4 +1,4 @@ |
||||
module.exports = () => { |
||||
require('../toast/createtoast')("Refresh", "View refreshed!"); |
||||
require('../toast/createtoast')("Refresh", "View refreshed!", undefined, undefined, undefined, () => require('../toast/createtoast')("Refresh vs. Reload", "Your view was refreshed. This means any changes to files or folders in the directory you're currently viewing will show. This should be all you need, but if the app is behaving weirdly, or you changed some settings that aren't loading properly, you can do a hard reload with <b>Ctrl + Shift + R</b>.", undefined, undefined, 10)); |
||||
require('../fileview/lightrefresh')(window.kade.cpath); |
||||
}; |
@ -0,0 +1,94 @@ |
||||
const fs = require('fs'); |
||||
const path = require('path'); |
||||
const Mousetrap = require('../dep/mousetrap'); |
||||
|
||||
const lightRefresh = require('../fileview/lightrefresh'); |
||||
const preModal = require('../modal/pre'); |
||||
const postModal = require('../modal/post'); |
||||
const showError = require('../modal/common/error'); |
||||
const clearModals = require('../modal/clearmodals'); |
||||
const newToast = require('../toast/createtoast'); |
||||
const refresh = require('../fileview/refresh'); |
||||
|
||||
module.exports = () => { |
||||
if (window.kade.modal) {return;} |
||||
preModal('rename-folder-modal-container'); |
||||
let modalOut = document.createElement('div'); |
||||
modalOut.className = 'modal'; |
||||
modalOut.id = 'rename-folder-modal-container'; |
||||
document.body.appendChild(modalOut); |
||||
let modal = document.createElement('div'); |
||||
modal.className = 'modal-wrapper'; |
||||
modalOut.appendChild(modal); |
||||
let title = document.createElement('h2'); |
||||
title.innerHTML = 'Rename Folder'; |
||||
modal.appendChild(title); |
||||
let text = document.createElement('p'); |
||||
text.innerHTML = "What would you like to rename this folder to?"; |
||||
modal.appendChild(text); |
||||
let cont = document.createElement('div'); |
||||
cont.className = 'button-container'; |
||||
modal.appendChild(cont); |
||||
let input = document.createElement('input'); |
||||
input.placeholder = window.kade.currentFolder; |
||||
input.id = 'rename-folder-input'; |
||||
input.value = window.kade.currentFolder; |
||||
let lastIn = ''; |
||||
input.oninput = () => { |
||||
if (!input.value.match(/^[a-zA-Z0-9-_() ]*$/gm)) {input.value = lastIn;} |
||||
else {lastIn = input.value;} |
||||
}; |
||||
cont.appendChild(input); |
||||
let conf = document.createElement('button'); |
||||
conf.innerHTML = 'Rename'; |
||||
conf.onclick = () => { |
||||
try { |
||||
input.value = input.value.trim(); |
||||
if (!input.value.length) {return;} |
||||
if (fs.existsSync(path.join(window.kade.cpath, input.value))) { |
||||
if (!input.value.match(/^.+\(\d\)$/gm)) {input.value += ' (1)';} |
||||
else { |
||||
let tempstr = input.value.split(''); |
||||
tempstr[input.value.length - 2] = `${Number(input.value.charAt(input.value.length - 2)) + 1}`; |
||||
input.value = tempstr.join(''); |
||||
} |
||||
return; |
||||
} |
||||
fs.renameSync(path.join(window.kade.cpath, window.kade.currentFolder), path.join(window.kade.cpath, input.value)); |
||||
lightRefresh(); |
||||
modalOut.remove(); |
||||
newToast( |
||||
"Folder renamed", [`Folder "${window.kade.currentFolder}" was successfully renamed to "${input.value}"`, `<em>${window.kade.cpath}/${input.value}</em>`], undefined, false, 5, |
||||
() => { |
||||
refresh(`${window.kade.cpath}/${input.value}`); |
||||
require('electron').clipboard.writeText(`${window.kade.cpath}`); |
||||
newToast("Copied!", "<em>The folder's path has been copied to your clipboard.</em>", "#19df46"); |
||||
} |
||||
); |
||||
} catch { |
||||
newToast("Folder not Renamed", "An error caused that folder to not be renamed.", "#b24355", false, 5, () => {showError("Folder Renaming", "There was an unknown error while trying to rename that folder. It may be a permissions issue, or the host folder doesn't exist anymore.");}); |
||||
clearModals(); |
||||
} |
||||
postModal(modalOut.id); |
||||
}; |
||||
cont.appendChild(conf); |
||||
input.focus(); |
||||
let msm = new Mousetrap(modal); |
||||
msm.bind('esc', () => { |
||||
lightRefresh(); |
||||
modalOut.remove(); |
||||
postModal(modalOut.id); |
||||
}); |
||||
msm.bind('enter', () => {conf.click();}); |
||||
let close = document.createElement('a'); |
||||
close.className = 'close-button'; |
||||
close.onclick = () => { |
||||
lightRefresh(); |
||||
modalOut.remove(); |
||||
postModal(modalOut.id); |
||||
}; |
||||
let closeWrap = document.createElement('div'); |
||||
closeWrap.className = 'close-button-wrapper'; |
||||
modal.appendChild(closeWrap); |
||||
closeWrap.appendChild(close); |
||||
} |
@ -0,0 +1,12 @@ |
||||
module.exports = (name) => { |
||||
let folders = document.getElementById('files').getElementsByClassName('folder'); |
||||
let folder = 1; |
||||
for (let i = 0; i < folders.length; i++) { |
||||
if (folders.item(i).children.item(1).innerHTML === name) { |
||||
folder = folders.item(i); |
||||
folder.click(); |
||||
break; |
||||
} |
||||
} |
||||
return folder; |
||||
}; |
@ -1,8 +1,10 @@ |
||||
const transit = require("./transit"); |
||||
|
||||
module.exports = (id) => { |
||||
document.getElementById('modal-block').remove(); |
||||
window.kade.modal = false; |
||||
document.body.style.overflowY = 'overlay'; |
||||
transit(id, false); |
||||
try { |
||||
try {document.getElementById('modal-block').remove();} catch {} |
||||
window.kade.modal = false; |
||||
document.body.style.overflowY = 'overlay'; |
||||
transit(id, false); |
||||
} catch {} |
||||
}; |
Loading…
Reference in new issue