Libraryless. Click here for Pure Java version (2204L/14K/51K).
1 | !7 |
2 | |
3 | static Class mainBot; |
4 | |
5 | static S html(S subUri, Map<S, S> params) { |
6 | S q = params.get("q"); |
7 | S styleClass = params.get("styleClass"); |
8 | S style = params.get("style"); |
9 | S a = trim((S) call(mainBot, "webAnswer", q)); |
10 | if (isEmpty(a)) |
11 | a = "(no response)"; |
12 | S s = htmlencode(a); |
13 | if (!empty(styleClass)) |
14 | s = "<span class=" + htmlQuote(styleClass) + ">" + s + "</span>"; |
15 | if (!empty(style)) |
16 | s = "<span style=" + htmlQuote(style) + ">" + s + "</style>"; |
17 | ret s; |
18 | } |
download show line numbers debug dex old transpilations
Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, jtubtzbbkimh, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1002076 |
Snippet name: | Answer Through Web Bot |
Eternal ID of this version: | #1002076/2 |
Text MD5: | c7ae9f6d21f145ae7affd4c14386860d |
Transpilation MD5: | 2a64142ca05b3e7cd3b4c2e42c6acf73 |
Author: | stefan |
Category: | |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-01-23 15:20:40 |
Source code size: | 497 bytes / 18 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 660 / 5202 |
Version history: | 1 change(s) |
Referenced in: | [show references] |