ai-video-detective / components /plugin-header.js
disgorge's picture
Make a Firefox plugin that can detect if a YouTube video was made using AI.
615132b verified
Raw
History Blame Contribute Delete
2.46 kB
class PluginHeader extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
:host {
display: block;
background: white;
border-radius: 0.75rem;
padding: 1.5rem;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
margin-bottom: 2rem;
}
.header-container {
display: flex;
align-items: center;
justify-content: space-between;
}
.title-container {
display: flex;
align-items: center;
}
.title-icon {
color: #ef4444;
margin-right: 0.75rem;
width: 2rem;
height: 2rem;
}
.title-text {
font-size: 1.5rem;
font-weight: 700;
color: #1f2937;
}
.controls {
display: flex;
align-items: center;
gap: 1rem;
}
.version-badge {
padding: 0.25rem 0.75rem;
background-color: #eff6ff;
color: #1e40af;
border-radius: 9999px;
font-size: 0.875rem;
font-weight: 500;
}
.settings-button {
color: #6b7280;
transition: color 0.2s;
}
.settings-button:hover {
color: #374151;
}
</style>
<div class="header-container">
<div class="title-container">
<i data-feather="alert-triangle" class="title-icon"></i>
<h1 class="title-text">AI Video Detective</h1>
</div>
<div class="controls">
<span class="version-badge">v1.0.0</span>
<button class="settings-button">
<i data-feather="settings"></i>
</button>
</div>
</div>
`;
}
}
customElements.define('plugin-header', PluginHeader);