Repository navigation
Expand file tree
/
Copy pathpopup.html
More file actions
212 lines (187 loc) · 8.07 KB
/
Copy pathpopup.html
File metadata and controls
212 lines (187 loc) · 8.07 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="popup.css" />
<title>OpenTube SEO</title>
</head>
<body>
<!-- ======== HEADER ======== -->
<header class="header">
<div class="brand">
<span class="logo">OT</span>
<div>
<h1>OpenTube SEO</h1>
<p class="tagline">100% offline · open source · zero tracking</p>
</div>
</div>
<span id="gpu-badge" class="badge">…</span>
</header>
<!-- ======== NOT ON YOUTUBE ======== -->
<section id="not-youtube" class="panel hidden">
<div class="empty-state">
<span class="empty-icon">▶</span>
<p><strong>Open a YouTube or Studio page</strong></p>
<p class="muted small">Works on any YouTube video, channel, search result, or Studio video editor.</p>
</div>
</section>
<!-- ======== MANUAL INPUT (only visible when scrape failed & no manual data yet) ======== -->
<section id="manual-section" class="panel hidden">
<div class="card" id="manual-input-card">
<h2>Paste your video data</h2>
<p class="muted small">Could not read video data from the page. Enter your details manually:</p>
<label class="input-label">Title</label>
<input type="text" id="manual-title" placeholder="Your video title" class="input" />
<label class="input-label" style="margin-top:6px">Description</label>
<textarea id="manual-description" placeholder="Your video description" class="input" rows="3"></textarea>
<label class="input-label" style="margin-top:6px">Tags (comma-separated)</label>
<input type="text" id="manual-tags" placeholder="tag1, tag2, tag3" class="input" />
<button id="btn-analyze-manual" class="btn primary small" style="margin-top:8px;width:100%">Analyze</button>
</div>
</section>
<!-- ======== ANALYSIS RESULTS (hidden until manual data exists) ======== -->
<section id="analysis-section" class="panel hidden">
<div class="card">
<div style="display:flex;justify-content:space-between;align-items:center">
<h2>Tag strategy breakdown</h2>
<button id="btn-show-manual-input" class="btn small" style="font-size:11px">Edit data</button>
</div>
<div id="competitor-analysis" class="muted small" style="margin-top:4px">
No tags found for this video.
</div>
</div>
<div class="card">
<h2>Recommended tags to add</h2>
<p class="muted small">Based on your title and description, here are missing tag categories and suggested tags.</p>
<div id="recommended-tags" class="muted small" style="margin-top:8px">
Add a title or description to get tag recommendations.
</div>
</div>
<div class="card">
<h2>Content gaps</h2>
<p class="muted small">Keywords in your title that aren't reflected in your description or tags — these are missed ranking opportunities.</p>
<div id="content-gaps" class="muted small" style="margin-top:8px">
No content data available. Open a video page first.
</div>
</div>
</section>
<!-- ======== MAIN APP ======== -->
<section id="app" class="panel hidden">
<!-- ======== TABS ======== -->
<nav class="tabs" id="tabs">
<button class="tab active" data-tab="seo">SEO</button>
<button class="tab" data-tab="keywords">Keywords</button>
<button class="tab" data-tab="ai">AI</button>
<button class="tab" data-tab="settings">⚙</button>
</nav>
<!-- ======== TAB: SEO Score ======== -->
<div id="tab-seo" class="tab-content active">
<div class="card">
<div class="score-row">
<div class="score-ring" id="score-ring">
<span id="score-num">–</span>
</div>
<div>
<h2 id="score-grade">SEO Score</h2>
<p id="score-sub" class="muted small">Analyzing…</p>
</div>
</div>
<div class="score-actions">
<button id="btn-reanalyze" class="btn small">Re-analyze</button>
<button id="btn-refresh" class="btn small">↻ Refresh page data</button>
</div>
<ul id="checklist" class="checklist"></ul>
</div>
<div class="card">
<h2>Readability</h2>
<div id="readability-score" class="muted small">Analyzing…</div>
</div>
<div class="card">
<h2>Video Info</h2>
<div id="video-info" class="muted small">Loading…</div>
</div>
</div>
<!-- ======== TAB: Keywords ======== -->
<div id="tab-keywords" class="tab-content">
<div class="card">
<h2>Extracted keywords</h2>
<div id="keywords-container" class="chips"></div>
<button id="btn-copy-keywords" class="btn small">Copy all keywords</button>
</div>
<div class="card">
<h2>Keyword research</h2>
<div class="input-row">
<input type="text" id="keyword-input" placeholder="Enter a keyword to research…" />
<button id="btn-research-keyword" class="btn primary small">Research</button>
</div>
<div id="keyword-research-results" class="muted small">Enter a keyword above to see suggestions, volume estimates, and related terms.</div>
</div>
<div class="card">
<h2>Long-tail suggestions</h2>
<div id="longtail-results" class="muted small">Research a keyword to see long-tail variations.</div>
</div>
</div>
<!-- ======== TAB: AI ======== -->
<div id="tab-ai" class="tab-content">
<div class="card">
<h2>AI suggestions</h2>
<p class="muted small">Generate optimized titles, tags, descriptions, and hashtags using local AI.</p>
<div class="ai-head">
<select id="model-select" class="select"></select>
</div>
<button id="btn-generate" class="btn primary" disabled>Generate with local AI</button>
<div id="ai-progress" class="progress hidden">
<div class="bar"><div id="bar-fill" class="bar-fill"></div></div>
<p id="progress-text" class="muted small"></p>
</div>
<div id="ai-results" class="ai-results"></div>
<div id="ai-not-available" class="hidden muted small">
WebGPU is not available. Use <strong>Chrome 116+</strong> or <strong>Edge 116+</strong> with WebGPU enabled.
In Brave, enable <code>#enable-unsafe-webgpu</code> at brave://flags.
</div>
</div>
</div>
<!-- ======== TAB: Settings ======== -->
<div id="tab-settings" class="tab-content">
<div class="card">
<h2>Settings</h2>
<label class="setting-row">
<span>Auto-analyze on video page</span>
<input type="checkbox" id="setting-auto" checked />
</label>
<label class="setting-row">
<span>Show SEO score badge on pages</span>
<input type="checkbox" id="setting-badge" checked />
</label>
<label class="setting-row">
<span>Enable Studio sidebar panel</span>
<input type="checkbox" id="setting-sidebar" checked />
</label>
<label class="setting-row">
<span>Use AI generation (requires WebGPU)</span>
<input type="checkbox" id="setting-ai" checked />
</label>
<label class="setting-row">
<span>Light theme</span>
<input type="checkbox" id="setting-light-theme" />
</label>
<div class="setting-row">
<span>AI model</span>
<select id="setting-model" class="select" style="width:auto"></select>
</div>
<hr class="divider" />
<button id="btn-export" class="btn small">Export data</button>
<button id="btn-import" class="btn small">Import data</button>
<input type="file" id="import-file" accept=".json" style="display:none" />
</div>
</div>
</section>
<!-- ======== FOOTER ======== -->
<footer class="footer">
<span class="muted small">Designed by <strong>Medo Hamdani</strong></span>
<a href="options.html" target="_blank" class="muted small" style="color:#9aa3b2">v2.0</a>
</footer>
<script type="module" src="popup.js"></script>
</body>
</html>