note reporting added
This commit is contained in:
@@ -18,8 +18,21 @@
|
||||
<a href="/{{.ID}}/stats">statistics</a> ·
|
||||
<a href="/{{.ID}}/edit">edit</a> ·
|
||||
<a href="/{{.ID}}/export">export</a> ·
|
||||
<a href="javascript:void(0)" onclick="report()">report abuse</a> ·
|
||||
{{end}}
|
||||
<a href="/TOS.md">terms of service</a>
|
||||
<script>
|
||||
function report() {
|
||||
var resp = prompt("Please shortly explain the problem with this note.");
|
||||
if (resp) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', '/{{.ID}}/report');
|
||||
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
||||
xhr.send("report=" + encodeURIComponent(resp));
|
||||
alert("Thank you!")
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user