Merge branch 'master' of gitlab.com:MrFry/question-node-server

This commit is contained in:
MrFry 2019-10-26 20:42:44 +02:00
commit a08a9049e2
2 changed files with 25 additions and 1 deletions

View file

@ -65,7 +65,9 @@
<%=dirname%>
</h1>
</center>
<h3>
<a href="<%= url + prevDir%>" > Up one level </a>
</h3>
</p>
<table class="maintable">

View file

@ -66,7 +66,29 @@
<%= missingFile %>
</br>
<a href="<%= url %>" > Back to root </a>
</br>
<a
onclick='goBack("<%=missingFile%>")'
href="#"
>
Go back
</a>
</h1>
</center>
</body>
<script>
function goBack(path) {
path = path.replace('./public/files', '')
if (path[path.length - 1] == '/') {
path = path.substring(0, path.length -2)
}
let p = path.split('/')
p.pop()
if (p.length > 1) {
location.href = p.join('/')
} else {
location.href = '/'
}
}
</script>
</html>