feat: hide IP addresses by default, click to reveal
Added maskIp() helper that replaces IPs with ••••••••. A global delegated click handler reveals the address on click. Applied to: - Player list 'Address' column - Player info 'Address' field Styled .ip-masked with dimmed text and purple hover glow. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -59,7 +59,11 @@ function PlayerInfoPage(params, container) {
|
||||
var fieldsHtml = '';
|
||||
for (var key in info) {
|
||||
if (info.hasOwnProperty(key)) {
|
||||
fieldsHtml += '<div class="col-sm-4"><p>' + key + ': <span class="badge">' + info[key] + '</span></p></div>';
|
||||
var value = info[key];
|
||||
if (key === 'Address') {
|
||||
value = maskIp(value);
|
||||
}
|
||||
fieldsHtml += '<div class="col-sm-4"><p>' + key + ': <span class="badge">' + value + '</span></p></div>';
|
||||
}
|
||||
}
|
||||
document.getElementById('pi-fields').innerHTML = fieldsHtml;
|
||||
|
||||
Reference in New Issue
Block a user