diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2022-12-24 21:05:40 +0100 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2022-12-24 21:05:40 +0100 |
commit | 64df44c6f9c78a5763bf89bd8ec4fa25439ebdaf (patch) | |
tree | 6a2d2015b001a23670438ed647272e9f78516590 /html/index.html | |
parent | fix typos (diff) | |
download | wg-api-web-64df44c6f9c78a5763bf89bd8ec4fa25439ebdaf.tar.gz wg-api-web-64df44c6f9c78a5763bf89bd8ec4fa25439ebdaf.zip |
html: add links to infobyip.comv1.1.0
Diffstat (limited to '')
-rw-r--r-- | html/index.html | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/html/index.html b/html/index.html index d8ce009..4a9ac19 100644 --- a/html/index.html +++ b/html/index.html @@ -237,6 +237,22 @@ Endpoint.prototype.sortable_value = function(value) { return value; } +Endpoint.prototype.cell_contents = function(value) { + value = this.sortable_value(value); + if (value == '-') + return Field.prototype.cell_contents.call(this, value); + + let parts = value.split(':'); + let ip = parts[0]; + + let elem = document.createElement('a'); + elem.setAttribute('href', 'https://infobyip.com/ip-' + ip + '.html'); + elem.setAttribute('target', '_blank'); + elem.appendChild(document.createTextNode(value)); + + return [elem]; +} + var Rx = function() { Field.call(this, 'receive_bytes'); } |