!7
sbool evil = true;
html {
if (eq(uri, "/content")) {
Payload payload = googleVerifyUserToken2(botCompanyGoogleSignInID(), params.get("token"));
if (payload == null)
ret "You are not logged in.";
pnlStruct(payload);
if (!payload.getEmailVerified())
ret "Unverified email (huh?)";
bool de = cic((S) payload.get("locale"), "de");
S firstName = (S) payload.get("given_name");
S text = p(htmlencode((de ? "Hallo " : "Hello ") + firstName));
S pic = (S) payload.get("picture");
if (isURL(pic))
text += p(htmlencode("Scheiße bist du hässlich:"))
+ p(himg(pic, title := firstName + ", ein typischer Lamer"));
ret text;
}
ret hhtml(hhead(htitle("Bot Hello")
+ loadJQuery()
+ googleSignIn_header())
+ hbody(hfullcenter(
googleSignIn_signInButton(relativeRawBotLink(programID(), "content"), [[document.getElementById("content").innerHTML = data;]])
+ hsmall(ahref(googleSignIn_signOutURL(), "Sign out") + "
"
+ div("", id := "content", style := "font-size: 30px")))));
}