aboutsummaryrefslogtreecommitdiff
path: root/public/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'public/index.html')
-rw-r--r--public/index.html10
1 files changed, 8 insertions, 2 deletions
diff --git a/public/index.html b/public/index.html
index dd2a12d..dcd4697 100644
--- a/public/index.html
+++ b/public/index.html
@@ -24,6 +24,7 @@
<div class="columns">
<div class="column"></div>
<div class="column">
+ <a class="button is-danger is-outlined" id='btnGithub' href='https://github.com/kanadeko/loli-safe' target='_blank'>View on Github</a>
<div id="dropzone">Click here or drag and drop files</div>
</div>
<div class="column"></div>
@@ -57,10 +58,15 @@
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState == XMLHttpRequest.DONE) {
+ console.log(xhr.responseText)
+ if(xhr.responseText !== 'not-authorized'){
+ document.getElementById('btnGithub').style.display = 'none';
+ document.getElementById('dropzone').style.display = 'flex';
+ }
if(xhr.responseText.maxFileSize)
- maxSize = xhr.responseText.maxFileSize
+ maxSize = xhr.responseText.maxFileSize;
if(xhr.responseText.urlPrefix)
- urlPrefix = xhr.responseText.urlPrefix + '/'
+ urlPrefix = xhr.responseText.urlPrefix + '/';
}
}
xhr.open('GET', '/api/info', true);