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

16
LINES

< > BotCompany Repo | #1023709 // agiBlue_linkForPhrase (old)

JavaX fragment (include)

sS agiBlue_linkForPhrase(S phrase, O... additionalParams) {
  S domain = makeAGIDomainPart(phrase), url;
  if (empty(domain)) null;
  bool readAs = neq(phrase, domain);
  if (l(domain) > maximumDomainPartLength()) {
    url = "http://agi.blue";
    domain = domain + ".agi.blue";
  } else {
    url = "http://" + domain + ".agi.blue";
    domain = null;
  }
    
  ret url + hquery(
    paramsPlus(additionalParams, +domain,
    key := readAs ? "read as" : null, value := readAs ? phrase : null));
}

Author comment

Began life as a copy of #1023646

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

-
Snippet ID: #1023709
Snippet name: agiBlue_linkForPhrase (old)
Eternal ID of this version: #1023709/1
Text MD5: 569367ca360350bd6e2afa9ceb667fd8
Author: stefan
Category: javax / html
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-03 22:37:15
Source code size: 514 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 272 / 302
Referenced in: