Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
369 lines (349 loc) · 16.7 KB
/
Copy pathindex.html
File metadata and controls
369 lines (349 loc) · 16.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Remove Background & Watermark - Free Online Tool | RM-BG</title>
<meta name="description" content="Remove photo backgrounds and strip Gemini / NotebookLM watermarks in your browser. Free, private, no upload required." />
<link rel="canonical" href="https://rm-bg.curzy.dev/" />
<meta property="og:title" content="RM-BG - Remove Background & Watermark" />
<meta property="og:description" content="Remove photo backgrounds and strip AI watermarks (Gemini, NotebookLM). 100% in-browser, free." />
<meta property="og:image" content="https://rm-bg.curzy.dev/logo.png" />
<meta property="og:url" content="https://rm-bg.curzy.dev/" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="RM-BG - Remove Background & Watermark" />
<meta name="twitter:description" content="Remove photo backgrounds and strip AI watermarks. Free, in-browser." />
<meta name="twitter:image" content="https://rm-bg.curzy.dev/logo.png" />
<link rel="icon" type="image/png" href="/logo.png" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<style>
:root {
--canvas: #09090b;
--canvas-soft: #18181b;
--ink: #fafafa;
--ink-muted: #a1a1aa;
--hairline: #27272a;
--hairline-strong: #71717a;
--primary: #ffffff;
--on-primary: #09090b;
--checker: #27272a;
--ok: #10b981;
--err: #ef4444;
--card-bg: #09090b;
}
[data-theme="light"] {
--canvas: #fafafa;
--canvas-soft: #f4f4f5;
--ink: #09090b;
--ink-muted: #71717a;
--hairline: #e4e4e7;
--hairline-strong: #a1a1aa;
--primary: #09090b;
--on-primary: #ffffff;
--checker: #e4e4e7;
--ok: #10b981;
--err: #ef4444;
--card-bg: #ffffff;
}
* { margin:0; padding:0; box-sizing:border-box; }
body {
font-family:'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
background:var(--canvas);
color:var(--ink);
min-height:100vh;
display:flex;
flex-direction:column;
align-items:center;
padding:4rem 1rem;
transition: background-color 0.2s, color 0.2s;
}
.container {
width:100%;
max-width:680px;
display:flex;
flex-direction:column;
align-items:center;
position:relative;
}
.gh-star { position:absolute; top:0; right:0; display:inline-flex; align-items:center; gap:.35rem; padding:.35rem .6rem; border:1px solid var(--hairline); border-radius:4px; color:var(--ink-muted); text-decoration:none; font-size:13px; font-family:'JetBrains Mono', monospace; background:var(--canvas-soft); }
.gh-star:hover { color:var(--ink); border-color:var(--hairline-strong); }
.gh-star svg { width:14px; height:14px; fill:currentColor; }
.gh-star .cnt { display:inline-flex; align-items:center; gap:.2rem; font-variant-numeric:tabular-nums; }
/* Brand & Heading */
.brand { display:flex; align-items:center; gap:.75rem; justify-content:center; margin-bottom:.5rem; }
.brand img.logo-img { width:36px; height:36px; border-radius:6px; object-fit:cover; border:1px solid var(--hairline-strong); }
h1 { font-size:28px; font-weight:700; letter-spacing:-0.5px; color:var(--ink); }
.sub { color:var(--ink-muted); margin-bottom:2.5rem; text-align:center; font-size:15px; max-width:540px; line-height:1.5; }
/* Main Application Card */
.app-card {
width:100%;
background:var(--card-bg);
border:1px solid var(--hairline);
border-radius:4px;
padding:1.25rem;
display:flex;
flex-direction:column;
gap:1rem;
}
/* Dropzone Upload */
.drop {
width:100%;
border:1px dashed var(--hairline-strong);
border-radius:4px;
padding:48px 1.5rem;
text-align:center;
cursor:pointer;
background:var(--canvas-soft);
display:flex;
flex-direction:column;
align-items:center;
justify-content:center;
transition: border-color 0.15s, background-color 0.15s;
}
.drop:hover, .drop.drag { border-color:var(--ink); background:var(--canvas); }
.drop .upload-icon { width:32px; height:32px; color:var(--ink-muted); margin-bottom:1rem; stroke-width:1.5; }
.drop .upload-text { font-size:15px; font-weight:600; color:var(--ink); margin-bottom:0.25rem; }
.drop p { font-size:13px; color:var(--ink-muted); }
input[type=file] { display:none; }
/* Processing Options */
.opts { display:flex; flex-direction:column; gap:0.75rem; }
.opt {
display:flex;
align-items:center;
gap:0.75rem;
background:var(--canvas-soft);
border:1px solid var(--hairline);
border-radius:4px;
padding:0.75rem 1rem;
cursor:pointer;
transition: border-color 0.15s, background-color 0.15s;
user-select:none;
}
.opt:hover { border-color:var(--hairline-strong); }
.opt input[type="checkbox"] {
width:18px;
height:18px;
accent-color:var(--primary);
cursor:pointer;
flex-shrink:0;
}
.opt span { font-size:14px; font-family:'JetBrains Mono', monospace; font-weight:500; color:var(--ink); }
/* Progress & Status */
.progress-section { display:none; flex-direction:column; gap:0.5rem; }
.progress-section.active { display:flex; }
.bar-wrap { width:100%; height:6px; background:var(--hairline); border-radius:3px; overflow:hidden; display:none; }
.bar { height:100%; width:0; background:var(--primary); transition:width .3s; }
.status { color:var(--ink-muted); min-height:1.2rem; text-align:center; font-size:13px; font-family:'JetBrains Mono', monospace; }
.status.err { color:var(--err); }
/* Results Grid */
.results-wrap { width:100%; margin-top:1.5rem; }
.grid { gap:1.25rem; width:100%; }
.grid[style*="flex"] {
display:grid !important;
grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
}
figure { background:var(--card-bg); border:1px solid var(--hairline); border-radius:4px; padding:1rem; display:flex; flex-direction:column; gap:0.75rem; }
figcaption {
font-size:13px;
color:var(--ink-muted);
font-family:'JetBrains Mono', monospace;
text-align:left;
border-bottom:1px solid var(--hairline);
padding-bottom:0.5rem;
}
.img-box {
width:100%;
aspect-ratio:1.2;
display:flex;
align-items:center;
justify-content:center;
background:var(--checker);
border-radius:2px;
overflow:hidden;
border:1px solid var(--hairline);
}
figure img { max-width:100%; max-height:100%; object-fit:contain; display:block; }
/* Download Action Button */
.actions { display:flex; justify-content:center; margin-top:1.25rem; width:100%; }
.dl {
display:none;
width:100%;
align-items:center;
justify-content:center;
gap:0.5rem;
background:var(--primary);
color:var(--on-primary);
padding:12px;
border-radius:4px;
border:1px solid var(--primary);
text-decoration:none;
font-weight:600;
font-size:14px;
cursor:pointer;
transition: opacity 0.15s;
}
.dl[style*="inline-block"] {
display:inline-flex !important;
}
.dl:hover { opacity:.85; }
.dl svg.download-icon { width:16px; height:16px; stroke-width:2.2; }
/* Footer & A11y */
*:focus-visible { outline: 1px solid var(--hairline-strong); outline-offset:2px; }
.footer { width:100%; margin-top:4rem; padding-top:2rem; display:flex; flex-direction:column; align-items:center; gap:1rem; border-top:1px solid var(--hairline); }
.footer-links { display:flex; gap:1.5rem; }
.footer-links a { color:var(--ink-muted); text-decoration:none; font-size:14px; }
.footer-links a:hover { color:var(--ink); }
.footer-meta { display:flex; gap:1rem; font-size:12px; color:var(--ink-muted); font-family:'JetBrains Mono', monospace; }
.lang-selector { display:flex; gap:.35rem; background:var(--canvas-soft); padding:.2rem; border-radius:4px; border:1px solid var(--hairline); }
.lang-btn { background:none; border:none; color:var(--ink-muted); padding:.2rem .4rem; border-radius:4px; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.lang-btn svg.flag { width:22px; height:16px; display:block; border-radius:1px; }
.lang-btn:hover { color:var(--ink); }
.lang-btn.active { background:var(--primary); color:var(--on-primary); }
/* Theme Toggle */
.theme-toggle { background:var(--canvas-soft); border:1px solid var(--hairline); color:var(--ink-muted); padding:.3rem .5rem; border-radius:4px; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.theme-toggle:hover { color:var(--ink); border-color:var(--hairline-strong); }
.theme-toggle svg { width:14px; height:14px; }
[data-theme="light"] .theme-toggle .sun { display:none; }
[data-theme="light"] .theme-toggle .moon { display:block; }
html:not([data-theme="light"]) .theme-toggle .sun { display:block; }
html:not([data-theme="light"]) .theme-toggle .moon { display:none; }
/* Responsive adjustments */
@media (max-width: 640px) {
body { padding: 2rem 1rem; }
.gh-star { position: static; margin-bottom: 1.5rem; align-self: center; }
.brand { flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
h1 { font-size: 24px; text-align: center; }
.sub { font-size: 14px; margin-bottom: 1.5rem; }
.app-card { padding: 1rem; gap: 0.75rem; }
.drop { padding: 36px 1rem; }
.grid[style*="flex"] { grid-template-columns: 1fr !important; }
}
</style>
</head>
<body>
<div class="container">
<a class="gh-star" id="ghStar" href="https://github.com/curzyori/rm-bg" target="_blank" rel="noopener" title="GitHub Stars">
<svg viewBox="0 0 24 24"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2Z"/></svg>
<span class="cnt" id="ghCount"><span id="ghNum">0</span></span>
</a>
<div class="brand">
<img src="/logo.png" alt="Logo" class="logo-img" />
<h1>RM-BG + Watermark</h1>
</div>
<p class="sub" data-i18n="subtitle">Upload 1 foto → hapus background + watermark Gemini/NotebookLM. Semua di browser, gratis.</p>
<main class="app-card">
<label class="drop" id="drop" tabindex="0" role="button" aria-label="Upload image">
<svg class="upload-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>
<polyline points="17 8 12 3 7 8"/>
<line x1="12" y1="3" x2="12" y2="15"/>
</svg>
<div class="upload-text" data-i18n="upload_main">Klik atau drop gambar (PNG/JPG/WebP)</div>
<p data-i18n="upload_sub">Max ~20MB. Diproses lokal, file tidak diupload.</p>
<input type="file" id="file" accept="image/png,image/jpeg,image/webp" aria-hidden="true" tabindex="-1" />
</label>
<div class="opts" role="group" aria-label="Processing options">
<label class="opt">
<input type="checkbox" id="optBg" checked />
<span data-i18n="opt_bg">Remove Background</span>
</label>
<label class="opt">
<input type="checkbox" id="optGemini" checked />
<span data-i18n="opt_gemini">Remove Gemini Watermark</span>
</label>
<label class="opt">
<input type="checkbox" id="optNotebook" checked />
<span data-i18n="opt_notebook">Remove NotebookLM Watermark</span>
</label>
</div>
<div class="progress-section" id="progressSection">
<div class="bar-wrap" id="barWrap"><div class="bar" id="bar"></div></div>
<div class="status" id="status" aria-live="polite"></div>
</div>
</main>
<div class="results-wrap">
<div class="grid" id="grid" style="display:none">
<figure>
<figcaption data-i18n="before_cap">Sebelum</figcaption>
<div class="img-box">
<img id="before" alt="before" />
</div>
</figure>
<figure>
<figcaption data-i18n="after_cap">Sesudah</figcaption>
<div class="img-box">
<img id="after" alt="after" />
</div>
</figure>
</div>
<div class="actions">
<a class="dl" id="download" download="cleaned.png" role="button" data-i18n="download">
<svg class="download-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>
<polyline points="7 10 12 15 17 10"/>
<line x1="12" y1="15" x2="12" y2="3"/>
</svg>
<span>Download PNG</span>
</a>
</div>
</div>
<footer class="footer">
73E9
div> <div style="display:flex; gap:.5rem; align-items:center;">
<div class="lang-selector" role="group" aria-label="Language selector">
<button type="button" class="lang-btn" data-lang="en" title="EN">
<svg viewBox="0 0 20 14" class="flag">
<rect width="20" height="14" fill="#fff"/>
<rect width="20" height="1.75" y="0" fill="#b22234"/>
<rect width="20" height="1.75" y="3.5" fill="#b22234"/>
<rect width="20" height="1.75" y="7" fill="#b22234"/>
<rect width="20" height="1.75" y="10.5" fill="#b22234"/>
<rect width="9" height="7.5" fill="#3c3b6e"/>
<polygon points="1.5,1.3 1.9,2.1 2.8,2.1 2.1,2.6 2.3,3.5 1.5,3 0.7,3.5 0.9,2.6 0.2,2.1 1.1,2.1" fill="#fff"/>
<polygon points="4.5,1.3 4.9,2.1 5.8,2.1 5.1,2.6 5.3,3.5 4.5,3 3.7,3.5 3.9,2.6 3.2,2.1 4.1,2.1" fill="#fff"/>
<polygon points="1.5,4.3 1.9,5.1 2.8,5.1 2.1,5.6 2.3,6.5 1.5,6 0.7,6.5 0.9,5.6 0.2,5.1 1.1,5.1" fill="#fff"/>
<polygon points="4.5,4.3 4.9,5.1 5.8,5.1 5.1,5.6 5.3,6.5 4.5,6 3.7,6.5 3.9,5.6 3.2,5.1 4.1,5.1" fill="#fff"/>
</svg>
</button>
<button type="button" class="lang-btn" data-lang="id" title="ID">
<svg viewBox="0 0 20 14" class="flag">
<rect width="20" height="7" fill="#ff0000"/>
<rect width="20" height="7" y="7" fill="#fff"/>
</svg>
</button>
<button type="button" class="lang-btn" data-lang="zh" title="中文">
<svg viewBox="0 0 20 14" class="flag">
<rect width="20" height="14" fill="#de2910"/>
<polygon points="3,1 3.6,2.5 5.3,2.5 3.9,3.5 4.4,5 3,4 1.6,5 2.1,3.5 0.7,2.5 2.4,2.5" fill="#ffde00"/>
<polygon points="10,1 10.3,1.8 11.1,1.8 10.5,2.3 10.7,3.1 10,2.6 9.3,3.1 9.5,2.3 8.9,1.8 9.7,1.8" fill="#ffde00"/>
<polygon points="9,4 9.3,4.8 10.1,4.8 9.5,5.3 9.7,6.1 9,5.6 8.3,6.1 8.5,5.3 7.9,4.8 8.7,4.8" fill="#ffde00"/>
<polygon points="11,4 11.3,4.8 12.1,4.8 11.5,5.3 11.7,6.1 11,5.6 10.3,6.1 10.5,5.3 9.9,4.8 10.7,4.8" fill="#ffde00"/>
</svg>
</button>
<button type="button" class="lang-btn" data-lang="ja" title="日本語">
<svg viewBox="0 0 20 14" class="flag">
<rect width="20" height="14" fill="#fff"/>
<circle cx="10" cy="7" r="4.2" fill="#bc002d"/>
</svg>
</button>
</div>
<button type="button" class="theme-toggle" id="themeToggle" aria-label="Toggle theme">
<svg class="sun" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="12" cy="12" r="4"/><path d="M12 2v2m0 16v2M4.93 4.93l1.41 1.41m11.32 11.32l1.41 1.41M2 12h2m16 0h2M6.34 17.66l-1.41 1.41m12.72-12.72l-1.41 1.41"/></svg>
<svg class="moon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"/></svg>
</button>
</div>
<nav class="footer-links" aria-label="Project links">
<a href="https://github.com/curzyori/rm-bg" target="_blank" rel="noopener" data-i18n="lnk_github">GitHub</a>
<a href="https://donate.curzy.dev" target="_blank" rel="noopener" data-i18n="lnk_donate">Donate</a>
</nav>
<div class="footer-meta">
<span data-i18n="meta_license">MIT License</span>
<span data-i18n="meta_version">Version 1.0.0</span>
</div>
</footer>
</div>
<script type="module" src="/src/main.js"></script>
</body>
</html>