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)

1  
sS agiBlue_linkForPhrase(S phrase, O... additionalParams) {
2  
  S domain = makeAGIDomainPart(phrase), url;
3  
  if (empty(domain)) null;
4  
  bool readAs = neq(phrase, domain);
5  
  if (l(domain) > maximumDomainPartLength()) {
6  
    url = "http://agi.blue";
7  
    domain = domain + ".agi.blue";
8  
  } else {
9  
    url = "http://" + domain + ".agi.blue";
10  
    domain = null;
11  
  }
12  
    
13  
  ret url + hquery(
14  
    paramsPlus(additionalParams, +domain,
15  
    key := readAs ? "read as" : null, value := readAs ? phrase : null));
16  
}

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: 215 / 232
Referenced in: [show references]