-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpopup.html
More file actions
122 lines (117 loc) · 2.66 KB
/
Copy pathpopup.html
File metadata and controls
122 lines (117 loc) · 2.66 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
body {
width: 300px;
padding: 20px;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
font-size: 13px;
color: #1a1a2e;
margin: 0;
}
.logo {
text-align: center;
margin-bottom: 16px;
}
.logo h2 {
margin: 0;
font-size: 18px;
background: linear-gradient(135deg, #6366f1, #8b5cf6);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.logo p {
margin: 4px 0 0;
font-size: 11px;
color: #888;
}
.status {
background: #f0fdf4;
border: 1px solid #bbf7d0;
border-radius: 8px;
padding: 12px;
margin-bottom: 12px;
text-align: center;
}
.status.inactive {
background: #f8fafc;
border-color: #e2e8f0;
}
.status strong {
color: #16a34a;
}
.status.inactive strong {
color: #94a3b8;
}
.info {
font-size: 12px;
color: #666;
line-height: 1.6;
}
.info ul {
padding-left: 16px;
margin: 8px 0;
}
.footer {
margin-top: 16px;
padding-top: 12px;
border-top: 1px solid #eee;
font-size: 11px;
color: #aaa;
text-align: center;
}
a {
color: #6366f1;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<div class="logo">
<h2>SourceCalc</h2>
<p>1688 Profit Calculator</p>
</div>
<div class="status" id="status">
<strong>Checking...</strong>
</div>
<div class="info">
<strong>How to use:</strong>
<ul>
<li>Browse any product on <strong>1688.com</strong></li>
<li>The calculator panel appears on the right</li>
<li>Enter your selling price and settings</li>
<li>Instantly see your profit breakdown</li>
</ul>
</div>
<div class="info">
<strong>Includes:</strong>
<ul>
<li>Auto-detect product price</li>
<li>International shipping estimates</li>
<li>Customs duty calculation</li>
<li>Amazon/Shopify/Temu/eBay fees</li>
<li>Real-time exchange rates</li>
</ul>
</div>
<div class="footer">
v0.1.0 | Free during beta
</div>
<script>
chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => {
const statusEl = document.getElementById('status');
const url = tabs[0]?.url || '';
if (url.includes('1688.com')) {
statusEl.innerHTML = '<strong>Active on this page!</strong><br>Look for the panel on the right.';
} else {
statusEl.className = 'status inactive';
statusEl.innerHTML = '<strong>Navigate to 1688.com</strong><br>The calculator will appear automatically on product pages.';
}
});
</script>
</body>
</html>