-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpopup.html
More file actions
186 lines (161 loc) · 4.04 KB
/
popup.html
File metadata and controls
186 lines (161 loc) · 4.04 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
<!DOCTYPE html>
<html>
<head>
<title>YouTube Smart PIP</title>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
padding: 20px;
}
h3 {
color: #333;
}
.toggle-container {
display: inline-block;
position: relative;
width: 60px;
height: 30px;
margin: 10px;
}
.toggle-container input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
transition: 0.4s;
border-radius: 15px;
}
.slider:before {
position: absolute;
content: "";
height: 24px;
width: 24px;
left: 3px;
bottom: 3px;
background-color: white;
transition: 0.4s;
border-radius: 50%;
}
input:checked+.slider {
background-color: #4CAF50;
}
input:checked+.slider:before {
transform: translateX(30px);
}
.status-label {
margin-top: 10px;
font-size: 14px;
color: #666;
}
/* Disabled state styling for toggles */
.disabled {
opacity: 0.5;
pointer-events: none;
}
.github-btn-container {
display: flex;
justify-content: center;
gap: 10px;
/* Adds spacing between buttons */
margin-top: 20px;
}
.github-btn {
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
padding: 10px 20px;
border-radius: 50px;
text-decoration: none;
background: linear-gradient(135deg, #007FFF 0%, #007FFF 100%);
color: white;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
transition: all 0.3s ease;
font-weight: bold;
}
.github-btn:hover {
transform: scale(1.05);
box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}
.github-btn img {
width: 16px;
margin-right: 8px;
vertical-align: middle;
}
/* Animation for the app icon */
@keyframes pulse {
0% {
transform: scale(1) rotate(0deg);
}
50% {
transform: scale(1.05) rotate(180deg);
}
100% {
transform: scale(1) rotate(360deg);
}
}
.app-icon {
animation: pulse 4s ease-in-out infinite;
transition: transform 0.3s ease;
cursor: pointer;
}
.app-icon:hover {
transform: scale(1.1);
animation-play-state: paused;
}
</style>
</head>
<body>
<!-- App Icon -->
<div style="margin-bottom: 20px;">
<a href="mailto:coderxrohan@gmail.com">
<img src="icon-128.png" alt="YouTube Smart PIP Icon" width="64" height="64" class="app-icon">
</a>
</div>
<!-- Main Toggle Button to Enable/Disable the Extension -->
<div>
<label class="toggle-container">
<input type="checkbox" id="main-toggle" />
<span class="slider"></span>
</label>
<div class="status-label" id="main-toggle-label">Extension: Off</div>
</div>
<!-- Button to enable Auto PiP on Tab Change -->
<div>
<label class="toggle-container">
<input type="checkbox" id="auto-pip-enable-toggle" />
<span class="slider"></span>
</label>
<div class="status-label" id="auto-pip-enable-label">Auto PiP: Off</div>
</div>
<!-- Button to automatically close PiP when returning to YouTube -->
<div>
<label class="toggle-container">
<input type="checkbox" id="close-pip-return-toggle" />
<span class="slider"></span>
</label>
<div class="status-label" id="close-pip-return-label">Close PiP on Return: Off</div>
</div>
<!-- Button to links -->
<div class="github-btn-container">
<a href="https://github.com/Coderxrohan/Smart-PIP" target="_blank" class="github-btn">
<img src="git.png" alt="GitHub Logo">
GitHub
</a>
<a href="https://form.jotform.com/250163398628060" target="_blank" class="github-btn">
<img src="feedback.png" alt="Support Logo" width="16" height="16">
Support
</a>
</div>
<script src="popup.js"></script>
</body>
</html>