Skip to content

Instantly share code, notes, and snippets.

@bkuri
Created September 1, 2025 05:02
Show Gist options
  • Select an option

  • Save bkuri/6d34ad636d141cda078287f5f2eecb84 to your computer and use it in GitHub Desktop.

Select an option

Save bkuri/6d34ad636d141cda078287f5f2eecb84 to your computer and use it in GitHub Desktop.
Tridactyl email autocomplete bindings - domain-based and random disposable emails
" Domain-based email with subdomain labels
bind ee js (function(){ var h = location.hostname; var parts = h.split('.'); var root = parts.length >= 2 ? parts.slice(-2).join('.') : h; var sub = parts.length > 2 ? parts.slice(0, -2).join('.') : ''; var email = sub && sub !== 'www' ? root + '+' + sub + '@bkuri.com' : root + '@bkuri.com'; var field = document.querySelector('input[type="email"], input[name="email"], input[id*="email" i], input[placeholder*="email" i], input[type="text"][name*="email" i], input[type="text"][id*="email" i]'); if(field) { field.focus(); field.value = email; field.dispatchEvent(new Event('input', {bubbles: true})); field.dispatchEvent(new Event('change', {bubbles: true})); } else { console.log('Generated:', email, '- No email field found'); } })()
" Random disposable email version
bind er js (function(){ var random = Math.random().toString(36).substring(2, 10); var email = random + '[email protected]'; var field = document.querySelector('input[type="email"], input[name="email"], input[id*="email" i], input[placeholder*="email" i], input[type="text"][name*="email" i], input[type="text"][id*="email" i]'); if(field) { field.focus(); field.value = email; field.dispatchEvent(new Event('input', {bubbles: true})); field.dispatchEvent(new Event('change', {bubbles: true})); } else { console.log('Generated random:', email, '- No email field found'); } })()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment