1
0
Fork 0
mirror of https://gitlab.com/hagrid-keyserver/hagrid.git synced 2023-02-13 20:55:02 -05:00

externalize all js

This commit is contained in:
Vincent Breitmoser 2019-08-13 17:24:25 +02:00
parent 2440d37485
commit 2eaec0b7dd
No known key found for this signature in database
GPG key ID: 7BD18320DEADFA11
2 changed files with 15 additions and 16 deletions

14
dist/assets/js/upload.js vendored Normal file
View file

@ -0,0 +1,14 @@
var body = document.getElementsByTagName("body")[0];
body.addEventListener('dragover', function(e) {
e.preventDefault();
e.stopPropagation();
}, false);
body.addEventListener('drop', function(e) {
e.preventDefault();
e.stopPropagation();
if (e.dataTransfer) {
document.getElementById('keytext').files = e.dataTransfer.files;
}
}, false);

View file

@ -15,21 +15,6 @@
Need more info? Check our <a target="_blank" href="/about">intro</a> and <a target="_blank" href="/about/usage">usage guide</a>! Need more info? Check our <a target="_blank" href="/about">intro</a> and <a target="_blank" href="/about/usage">usage guide</a>!
</p> </p>
<script> <script src="/assets/js/upload.js" async />
var body = document.getElementsByTagName("body")[0];
body.addEventListener('dragover', function(e) {
e.preventDefault();
e.stopPropagation();
}, false);
body.addEventListener('drop', function(e) {
e.preventDefault();
e.stopPropagation();
if (e.dataTransfer) {
document.getElementById('keytext').files = e.dataTransfer.files;
}
}, false);
</script>
</div> </div>
{{/layout}} {{/layout}}