feat: initial Silent Send browser extension

Chrome Manifest V3 extension that intercepts personal data and
substitutes it with user-defined replacements before sending to
Claude.ai. Hooks fetch() in the page's main world to catch API
requests, with bidirectional substitution (real→fake on send,
fake→real on display via reveal mode).

Includes popup UI with mapping management, live test/diff view,
activity log with badge count, options page with import/export,
and Shadow DOM traversal for Claude.ai compatibility.

https://claude.ai/code/session_01Dvgwe7XMoSxnWXkih8p1Cw
This commit is contained in:
Claude
2026-03-25 23:26:13 +00:00
commit 4576597e64
19 changed files with 2100 additions and 0 deletions
+455
View File
@@ -0,0 +1,455 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
width: 400px;
min-height: 300px;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
font-size: 13px;
color: #1a1a1a;
background: #fff;
}
.container {
display: flex;
flex-direction: column;
min-height: 300px;
}
/* Header */
.header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 16px;
border-bottom: 1px solid #e5e7eb;
}
.header-left {
display: flex;
align-items: center;
gap: 8px;
}
.header-right {
display: flex;
align-items: center;
gap: 8px;
}
.title {
font-size: 15px;
font-weight: 600;
color: #111;
}
.status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #10b981;
transition: background 0.2s;
}
.status-dot.disabled {
background: #6b7280;
}
.status-dot.off-site {
background: #f59e0b;
}
/* Toggle */
.toggle {
position: relative;
display: inline-block;
width: 36px;
height: 20px;
}
.toggle input { display: none; }
.toggle-slider {
position: absolute;
inset: 0;
background: #d1d5db;
border-radius: 20px;
cursor: pointer;
transition: 0.2s;
}
.toggle-slider::before {
content: '';
position: absolute;
width: 16px;
height: 16px;
left: 2px;
bottom: 2px;
background: #fff;
border-radius: 50%;
transition: 0.2s;
}
.toggle input:checked + .toggle-slider {
background: #10b981;
}
.toggle input:checked + .toggle-slider::before {
transform: translateX(16px);
}
/* Button styles */
.btn-icon {
background: none;
border: 1px solid #e5e7eb;
border-radius: 6px;
padding: 4px 6px;
cursor: pointer;
color: #6b7280;
display: flex;
align-items: center;
transition: all 0.15s;
}
.btn-icon:hover {
background: #f3f4f6;
color: #111;
}
.btn-icon.active {
background: #eff6ff;
border-color: #3b82f6;
color: #3b82f6;
}
.btn {
padding: 6px 14px;
border: none;
border-radius: 6px;
font-size: 12px;
font-weight: 500;
cursor: pointer;
transition: all 0.15s;
}
.btn-primary {
background: #111;
color: #fff;
}
.btn-primary:hover {
background: #333;
}
.btn-text {
background: none;
border: none;
color: #6b7280;
cursor: pointer;
font-size: 12px;
}
.btn-text:hover {
color: #111;
}
/* Tabs */
.tabs {
display: flex;
border-bottom: 1px solid #e5e7eb;
padding: 0 16px;
}
.tab {
background: none;
border: none;
padding: 8px 16px;
font-size: 12px;
font-weight: 500;
color: #6b7280;
cursor: pointer;
border-bottom: 2px solid transparent;
transition: all 0.15s;
}
.tab:hover { color: #111; }
.tab.active {
color: #111;
border-bottom-color: #111;
}
.tab-content {
display: none;
padding: 12px 16px;
flex: 1;
overflow-y: auto;
max-height: 350px;
}
.tab-content.active { display: block; }
/* Inputs */
.input-row {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 8px;
}
.input-row.secondary {
margin-bottom: 0;
}
.input {
flex: 1;
padding: 7px 10px;
border: 1px solid #d1d5db;
border-radius: 6px;
font-size: 12px;
outline: none;
transition: border-color 0.15s;
}
.input:focus {
border-color: #111;
}
.select {
padding: 6px 8px;
border: 1px solid #d1d5db;
border-radius: 6px;
font-size: 12px;
outline: none;
background: #fff;
}
.arrow {
color: #9ca3af;
font-size: 16px;
flex-shrink: 0;
}
.checkbox-label {
display: flex;
align-items: center;
gap: 4px;
font-size: 11px;
color: #6b7280;
white-space: nowrap;
}
/* Mapping list */
.add-mapping {
padding-bottom: 12px;
border-bottom: 1px solid #f3f4f6;
margin-bottom: 8px;
}
.mapping-list {
display: flex;
flex-direction: column;
gap: 4px;
}
.mapping-item {
display: flex;
align-items: center;
gap: 8px;
padding: 8px;
border-radius: 6px;
background: #f9fafb;
transition: background 0.15s;
}
.mapping-item:hover {
background: #f3f4f6;
}
.mapping-values {
flex: 1;
min-width: 0;
}
.mapping-real {
font-weight: 500;
color: #dc2626;
font-size: 12px;
text-decoration: line-through;
opacity: 0.7;
}
.mapping-sub {
font-weight: 500;
color: #059669;
font-size: 12px;
}
.mapping-category {
font-size: 10px;
color: #9ca3af;
background: #f3f4f6;
padding: 2px 6px;
border-radius: 4px;
text-transform: uppercase;
}
.mapping-actions {
display: flex;
gap: 4px;
}
.mapping-actions button {
background: none;
border: none;
cursor: pointer;
color: #9ca3af;
font-size: 14px;
padding: 2px 4px;
border-radius: 4px;
}
.mapping-actions button:hover {
background: #e5e7eb;
color: #111;
}
/* Activity */
.activity-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
}
.badge {
font-size: 11px;
color: #6b7280;
background: #f3f4f6;
padding: 3px 8px;
border-radius: 10px;
}
.activity-list {
display: flex;
flex-direction: column;
gap: 4px;
}
.activity-item {
display: flex;
align-items: flex-start;
gap: 8px;
padding: 6px 8px;
border-radius: 6px;
background: #f9fafb;
font-size: 12px;
}
.activity-time {
color: #9ca3af;
font-size: 11px;
white-space: nowrap;
}
.activity-detail {
flex: 1;
}
.activity-original {
color: #dc2626;
text-decoration: line-through;
}
.activity-replaced {
color: #059669;
}
/* Test tab */
.help-text {
font-size: 12px;
color: #6b7280;
margin-bottom: 8px;
}
.textarea {
width: 100%;
padding: 8px 10px;
border: 1px solid #d1d5db;
border-radius: 6px;
font-size: 12px;
font-family: inherit;
resize: vertical;
outline: none;
}
.textarea:focus {
border-color: #111;
}
.diff-view {
margin-top: 10px;
padding: 10px;
background: #f9fafb;
border-radius: 6px;
border: 1px solid #e5e7eb;
}
.diff-label {
font-size: 11px;
font-weight: 600;
color: #6b7280;
margin-bottom: 6px;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.diff-output {
font-size: 12px;
line-height: 1.6;
word-break: break-word;
min-height: 20px;
color: #374151;
}
.diff-output .sub-highlight {
background: #dcfce7;
color: #059669;
padding: 1px 4px;
border-radius: 3px;
font-weight: 500;
}
.diff-stats {
margin-top: 6px;
font-size: 11px;
color: #6b7280;
}
/* Empty state */
.empty-state {
text-align: center;
color: #9ca3af;
padding: 24px 0;
font-size: 12px;
}
/* Footer */
.footer {
padding: 8px 16px;
border-top: 1px solid #e5e7eb;
text-align: center;
}
.footer a {
font-size: 11px;
color: #6b7280;
text-decoration: none;
}
.footer a:hover {
color: #111;
}