diff options
| author | Pitu <[email protected]> | 2017-01-30 06:00:01 -0300 |
|---|---|---|
| committer | Pitu <[email protected]> | 2017-01-30 06:00:01 -0300 |
| commit | 1ec6bbb640d4c7a5f29d7c02ab89a7ab0c1daa1a (patch) | |
| tree | 821e7af5cf3c3d7bbbba152673176b80adb17e89 /public | |
| parent | Smol fix (diff) | |
| download | host.fuwn.me-1ec6bbb640d4c7a5f29d7c02ab89a7ab0c1daa1a.tar.xz host.fuwn.me-1ec6bbb640d4c7a5f29d7c02ab89a7ab0c1daa1a.zip | |
No more asking token on front if private
Diffstat (limited to 'public')
| -rw-r--r-- | public/js/upload.js | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/public/js/upload.js b/public/js/upload.js index b52f670..5b5ad6b 100644 --- a/public/js/upload.js +++ b/public/js/upload.js @@ -21,13 +21,7 @@ upload.checkIfPublic = function(){ upload.preparePage = function(){ if(!upload.isPrivate) return upload.prepareUpload(); - if(!upload.token){ - document.getElementById('tokenSubmit').addEventListener('click', function(){ - upload.verifyToken(document.getElementById('token').value) - }); - document.getElementById('tokenContainer').style.display = 'flex'; - return; - } + if(!upload.token) return document.getElementById('loginToUpload').style.display = 'inline-flex'; upload.verifyToken(upload.token, true); } @@ -74,7 +68,7 @@ upload.prepareUpload = function(){ div.style.display = 'flex'; document.getElementById('maxFileSize').innerHTML = 'Maximum upload size per file is ' + upload.maxFileSize; - document.getElementById('tokenContainer').style.display = 'none'; + document.getElementById('loginToUpload').style.display = 'none'; document.getElementById('uploadContainer').appendChild(div); upload.prepareDropzone(); |