get recaptcha site key from api

This commit is contained in:
2018-09-19 22:26:52 +02:00
parent 616fe14ba3
commit 5207abd15f
9 changed files with 84 additions and 42 deletions

View File

@@ -204,6 +204,12 @@ var UploadWorker = /** @class */ (function () {
});
};
UploadWorker.prototype.setHistoryCookie = function (id) {
// Make sure the user is not logged in, for privacy. This keeps the
// files uploaded while logged in and anonymously uploaded files
// separated
if (Cookie.read("pd_auth_key") !== null) {
return;
}
var uc = Cookie.read("pduploads");
// First upload in this browser
if (uc === null) {

View File

@@ -117,6 +117,13 @@ class UploadWorker {
}
private setHistoryCookie(id: string){
// Make sure the user is not logged in, for privacy. This keeps the
// files uploaded while logged in and anonymously uploaded files
// separated
if (Cookie.read("pd_auth_key") !== null) {
return;
}
var uc = Cookie.read("pduploads")
// First upload in this browser

View File

@@ -43,13 +43,13 @@
<hr/>
</td>
</tr>
<tr class="form">
{{if ne .Other "none"}}<tr class="form">
<td>
Turing test<br/>
(Click the white box)
</td>
<td style="text-align: center;">
<div class="g-recaptcha" data-theme="dark" data-sitekey="6Lfbzz4UAAAAAAaBgox1R7jU0axiGneLDkOA-PKf"></div>
<div class="g-recaptcha" data-theme="dark" data-sitekey="{{.Other}}"></div>
</td>
</tr>
<tr class="form">
@@ -58,7 +58,7 @@
an evil robot that is trying to flood the website
with fake accounts<br/><hr/>
</td>
</tr>
</tr>{{end}}
<tr class="form">
<td colspan="2" style="text-align: right;">
<input type="submit" value="Register" class="button_highlight"/>