Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

17
LINES

< > BotCompany Repo | #1002139 // HTML Image Bot (with bottom link)

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (124L/2K/4K).

!752

static S html(S subUri, Map<S, S> params) {
  S id = params.get("id");
  S bottomLink = params.get("bottomLink");
  if (id == null) ret "please specify id";
  S imgURL = snippetImageURL(id);
  new StringBuilder buf;
  buf.append("<html><head><title>TinyBrain Image</title></head>\n" +
    "<table width='100%' height='100%' border=0><tr><td align=center>");
  buf.append("<img src=" + htmlQuote(imgURL) + ">");
  if (!empty(bottomLink))
    buf.append("</td></tr> <tr height=1><td align=center>" + bottomLink);
  buf.append("</td></tr></table>\n" +
    "<body></body></html>");
  ret str(buf);
}

Author comment

Began life as a copy of #1002138

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, jtubtzbbkimh, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1002139
Snippet name: HTML Image Bot (with bottom link)
Eternal ID of this version: #1002139/1
Text MD5: 48e6f357a2f1e766cb99711a31b76b4d
Transpilation MD5: 2772255104829fcff1fe7983c8e5a77c
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-12-21 20:47:50
Source code size: 617 bytes / 17 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 659 / 1255
Referenced in: [show references]