feat: add hostname substitution in user@host patterns
jsmith@macbook-pro now becomes ademo@mycomputer when both username and hostname are configured in the Identity tab. Hostnames are also caught standalone (e.g. just "macbook-pro" in text). Also rewrites README with detailed step-by-step Mozilla API key setup instructions for Firefox signing. https://claude.ai/code/session_01Dvgwe7XMoSxnWXkih8p1Cw
This commit is contained in:
@@ -74,7 +74,12 @@
|
||||
<span class="arrow">→</span>
|
||||
<input type="text" id="idUserSub" placeholder="ademo" class="input input-sm">
|
||||
</div>
|
||||
<div class="id-hint">Catches: jsmith@hostname, /home/jsmith, ~jsmith, C:\Users\jsmith</div>
|
||||
<div class="id-row">
|
||||
<input type="text" id="idHostReal" placeholder="macbook-pro" class="input input-sm">
|
||||
<span class="arrow">→</span>
|
||||
<input type="text" id="idHostSub" placeholder="mycomputer" class="input input-sm">
|
||||
</div>
|
||||
<div class="id-hint">Catches: jsmith@macbook-pro, /home/jsmith, ~jsmith, C:\Users\jsmith</div>
|
||||
</div>
|
||||
|
||||
<div class="id-section">
|
||||
|
||||
@@ -111,6 +111,11 @@ function loadIdentityForm() {
|
||||
$('#idUserReal').value = user.real || '';
|
||||
$('#idUserSub').value = user.substitute || '';
|
||||
}
|
||||
const host = (identity.hostnames || [])[0];
|
||||
if (host) {
|
||||
$('#idHostReal').value = host.real || '';
|
||||
$('#idHostSub').value = host.substitute || '';
|
||||
}
|
||||
if (phone) {
|
||||
$('#idPhoneReal').value = phone.real || '';
|
||||
$('#idPhoneSub').value = phone.substitute || '';
|
||||
@@ -144,6 +149,13 @@ async function saveIdentity() {
|
||||
usernames.push({ real: userReal, substitute: userSub });
|
||||
}
|
||||
|
||||
const hostnames = [];
|
||||
const hostReal = $('#idHostReal').value.trim();
|
||||
const hostSub = $('#idHostSub').value.trim();
|
||||
if (hostReal && hostSub) {
|
||||
hostnames.push({ real: hostReal, substitute: hostSub });
|
||||
}
|
||||
|
||||
const phones = [];
|
||||
const phoneReal = $('#idPhoneReal').value.trim();
|
||||
const phoneSub = $('#idPhoneSub').value.trim();
|
||||
@@ -155,6 +167,7 @@ async function saveIdentity() {
|
||||
names,
|
||||
emails,
|
||||
usernames,
|
||||
hostnames,
|
||||
phones,
|
||||
catchAllEmail: $('#idCatchAllEmail').value.trim(),
|
||||
emailDomains: identity.emailDomains || [],
|
||||
|
||||
Reference in New Issue
Block a user