Shaik-Mohammad-Kaif commited on
Commit
8dc8901
·
0 Parent(s):

Initial commit of project files

Browse files
Files changed (8) hide show
  1. .gitignore +3 -0
  2. app.py +52 -0
  3. icons/OverviewIcon.jpeg +0 -0
  4. manifest.json +31 -0
  5. pop.css +10 -0
  6. popup.html +308 -0
  7. popup.js +134 -0
  8. templates/popup.html +274 -0
.gitignore ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ __pycache__/
2
+ venv/
3
+ *.pyc
app.py ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from flask import Flask, jsonify, request,render_template
2
+ from flask_cors import CORS
3
+ from bs4 import BeautifulSoup
4
+ import google.generativeai as genai
5
+
6
+ app = Flask(__name__)
7
+ CORS(app)
8
+
9
+ # Configure and initialize your AI model
10
+ genai.configure(api_key="AIzaSyCZVlIW9i4nCb7EDLdnfjhGGcMpELoCGSo")
11
+ model = genai.GenerativeModel('gemini-1.5-flash')
12
+
13
+ @app.route('/', methods=['GET', 'POST'])
14
+ def home():
15
+ return render_template('popup.html')
16
+
17
+ def generate_ai_response(input_text):
18
+ try:
19
+ # Start a new chat session with the AI model
20
+ chat = model.start_chat(history=[])
21
+ response = chat.send_message(input_text + " \n Generate overview of text")
22
+ print("AI Response:", response.text)
23
+ return response.text
24
+ except Exception as e:
25
+ print("Error generating AI response:", str(e))
26
+ return "Error generating AI response."
27
+
28
+ @app.route('/generate_summary', methods=['POST'])
29
+ def generate_summary():
30
+ try:
31
+ data = request.json
32
+
33
+ html_content = data.get('html_content', '')
34
+ js_content = data.get('js_content', '')
35
+
36
+ # Remove HTML tags using BeautifulSoup
37
+ soup_html = BeautifulSoup(html_content, 'html.parser')
38
+ text_only_html = soup_html.get_text(separator=' ')
39
+
40
+ # Combine processed HTML and JS content for AI input
41
+ combined_text = f"{text_only_html} {js_content}"
42
+ print(combined_text)
43
+ # Generate AI response based on combined text
44
+ ai_response = generate_ai_response(combined_text)
45
+
46
+ return jsonify({"ai_response": ai_response})
47
+ except Exception as e:
48
+ return jsonify({"error": str(e)})
49
+
50
+
51
+ if __name__ == "__main__":
52
+ app.run()
icons/OverviewIcon.jpeg ADDED
manifest.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "manifest_version": 3,
3
+ "name": "Tab Overview AI",
4
+ "version": "1.0",
5
+ "homepage_url": "https://taboverviewai.onrender.com/",
6
+ "description": "AI-generated summaries of web pages to help users quickly grasp key points and save time.",
7
+ "permissions": [
8
+ "activeTab",
9
+ "tabs",
10
+ "storage",
11
+ "scripting"
12
+ ],
13
+ "host_permissions": [
14
+ "http://127.0.0.1:5000/",
15
+ "https://taboverviewai.onrender.com/"
16
+ ],
17
+ "icons": {
18
+ "128": "icons/OverviewIcon.jpeg"
19
+ },
20
+ "action": {
21
+ "default_popup": "popup.html",
22
+ "default_icon": {
23
+ "128": "icons/OverviewIcon.jpeg"
24
+ }
25
+ },
26
+ "browser_specific_settings": {
27
+ "gecko": {
28
+ "id": "{df7d4f48-efa2-4528-82df-992fb49f3303}"
29
+ }
30
+ }
31
+ }
pop.css ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ body {
2
+ font-family: Arial, sans-serif;
3
+ width: 1000px;
4
+ padding: 10px;
5
+ }
6
+
7
+ button {
8
+ margin: 5px 0;
9
+ }
10
+
popup.html ADDED
@@ -0,0 +1,308 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>My Extension</title>
5
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
6
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
7
+ <link href="https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&display=swap" rel="stylesheet">
8
+ <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
9
+ <style>
10
+ body {
11
+ width: 350px;
12
+ height: 550px;
13
+ font-family: 'Poppins', sans-serif;
14
+ display: flex;
15
+ justify-content: center;
16
+ align-items: center;
17
+ flex-direction: column;
18
+ background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
19
+ margin: 0;
20
+ padding: 0;
21
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
22
+ border-radius: 10px;
23
+ }
24
+
25
+ nav {
26
+ position: fixed;
27
+ top: 0;
28
+ width: 100%;
29
+ text-align: center;
30
+ background-color: #3571ff;
31
+ color: #ffffff;
32
+ font-size: 24px;
33
+ padding: 15px 0;
34
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
35
+ z-index: 1000;
36
+ }
37
+
38
+ .cont {
39
+ margin-top: 60px;
40
+ margin-bottom: 60px;
41
+ position: relative;
42
+ display: flex;
43
+ flex-direction: column;
44
+ align-items: center;
45
+ justify-content: center;
46
+ width: 100%;
47
+ padding: 20px;
48
+ box-sizing: border-box;
49
+ }
50
+
51
+ .output {
52
+ font-size: 17px;
53
+ margin-top: 20px;
54
+ background: #ffffff;
55
+ padding: 15px;
56
+ border-radius: 5px;
57
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
58
+ width: 100%;
59
+ text-align: left;
60
+ margin-bottom: 40px;
61
+ }
62
+
63
+ #output p {
64
+ margin: 0;
65
+ }
66
+
67
+ .top {
68
+ justify-content: flex-start;
69
+ align-items: flex-start;
70
+ padding-top: 20px;
71
+ }
72
+
73
+ .bar-1 {
74
+ display: flex;
75
+ justify-content: space-between;
76
+ align-content: center;
77
+ align-items: center;
78
+ width: 100%;
79
+ margin-bottom: 20px;
80
+ }
81
+
82
+ .button {
83
+ padding: 20px 20px;
84
+ font-size: 18px;
85
+ font-weight: 700;
86
+ cursor: pointer;
87
+ border: none;
88
+ border-radius: 5px;
89
+ background-color: #4caf50;
90
+ color: #ffffff;
91
+ transition: background-color 0.3s ease-in-out, transform 0.3s;
92
+
93
+ }
94
+
95
+ .copybtn {
96
+ padding: 20px 20px;
97
+ font-size: 18px;
98
+ font-weight: 700;
99
+ cursor: pointer;
100
+ border: none;
101
+ border-radius: 45px;
102
+ background-color: #4caf50;
103
+ color: #ffffff;
104
+ transition: background-color 0.3s ease-in-out, transform 0.3s;
105
+ }
106
+
107
+ .button:hover, .copybtn:hover {
108
+ background-color: #45a049;
109
+ transform: translateY(-2px);
110
+ }
111
+
112
+ .button:active, .copybtn:active {
113
+ background-color: #3e8e41;
114
+ transform: translateY(0);
115
+ }
116
+
117
+ .copybtn[disabled] {
118
+ background-color: #ccc; /* Disabled button color */
119
+ cursor: not-allowed;
120
+ }
121
+
122
+ .copied-message {
123
+
124
+ position: fixed;
125
+ bottom: 50%;
126
+ left: 50%;
127
+ transform: translateX(-50%);
128
+ background-color: #626262;
129
+ color: white;
130
+ padding: 10px 20px;
131
+ border-radius: 5px;
132
+ font-size: 16px;
133
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
134
+ }
135
+
136
+ .footer {
137
+ position: fixed;
138
+ bottom: 0;
139
+ width: 100%;
140
+ background-color: #333;
141
+ color: #fff;
142
+ text-align: center;
143
+ padding: 10px 0;
144
+ }
145
+
146
+ .modal {
147
+ display: none;
148
+ position: fixed;
149
+ z-index: 1000;
150
+ left: 0;
151
+ top: 0;
152
+ width: 100%;
153
+ height: 100%;
154
+ overflow: auto;
155
+ background-color: rgba(0, 0, 0, 0.5);
156
+ }
157
+
158
+ .modal-content {
159
+ position: absolute;
160
+ top: 50%;
161
+ left: 50%;
162
+ transform: translate(-50%, -50%);
163
+ background-color: #fff;
164
+ padding: 20px;
165
+ border-radius: 10px;
166
+ text-align: center;
167
+ font-size: 20px;
168
+ color: #4caf50;
169
+ }
170
+
171
+ .signin-modal-content {
172
+ font-size: 20px;
173
+ color: #000;
174
+ }
175
+
176
+ .sidebar {
177
+ position: fixed;
178
+ width: 150px;
179
+ left: -150px;
180
+ height: 100%;
181
+ background-color: #ebf5ff;
182
+ box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
183
+ transition: all 0.5s ease;
184
+ z-index: 1000;
185
+ }
186
+
187
+ .sidebar header {
188
+ font-size: 17px;
189
+ color: #DBE2EF;
190
+ line-height: 52px;
191
+ text-align: center;
192
+ background-color: #3571ff;
193
+ user-select: none;
194
+ font-weight: 700;
195
+ }
196
+
197
+ .sidebar a {
198
+ font-size: 15px;
199
+ display: block;
200
+ height: 60px;
201
+ width: 140px;
202
+ color: #000000;
203
+ line-height: 60px;
204
+ padding-left: 10px;
205
+ padding-bottom: 10px;
206
+ box-sizing: border-box;
207
+ border-left: 5px solid transparent;
208
+ text-decoration: none;
209
+ transition: all 0.3s ease;
210
+ }
211
+
212
+ .sidebar a:hover,
213
+ .sidebar a.active {
214
+ border-left: 5px solid #3571ff;
215
+ background-color: #8cadfa;
216
+ color: #fff;
217
+ }
218
+
219
+ .sidebar a i {
220
+ font-size: 17px;
221
+ margin-right: 10px;
222
+ }
223
+
224
+ .sidebar a span {
225
+ letter-spacing: 1px;
226
+ text-transform: uppercase;
227
+ }
228
+
229
+ #check {
230
+ display: none;
231
+ position: fixed;
232
+ top: 15px;
233
+ left: 15px;
234
+ }
235
+
236
+ label #btn,
237
+ label #cancel {
238
+ position: fixed;
239
+ left: 10px;
240
+ cursor: pointer;
241
+ color: #fff;
242
+ border-radius: 5px;
243
+ margin-bottom: 2px;
244
+ margin-left: 2px;
245
+ margin-right: 2px;
246
+ font-size: 20px;
247
+ background-color: #3571ff;
248
+ padding: 10px;
249
+ transition: all 0.5s ease;
250
+ z-index: 1100;
251
+ }
252
+
253
+ label #cancel {
254
+ opacity: 0;
255
+ visibility: hidden;
256
+ }
257
+
258
+ #check:checked ~ .sidebar {
259
+ left: 0;
260
+ }
261
+
262
+ #check:checked ~ label #btn {
263
+ opacity: 0;
264
+ visibility: hidden;
265
+ }
266
+
267
+ #check:checked ~ label #cancel {
268
+ opacity: 1;
269
+ visibility: visible;
270
+ }
271
+ </style>
272
+ </head>
273
+ <body>
274
+ <nav>
275
+ <input type="checkbox" id="check">
276
+ <label for="check">
277
+ <i class="fas fa-bars" id="btn" style="font-size: 15px;"></i>
278
+ <i class="fas fa-times" id="cancel" style="font-size: 15px;"></i>
279
+ </label>
280
+ <div class="sidebar">
281
+ <header>Menu</header>
282
+ <a href="mailto:peketinaveen87@gmail.com?subject=Feedback%20for%20TabOverviewAI&body=Dear%20TabOverviewAI%20team,%0D%0A%0D%0AI have some feedback...">
283
+ <i class="fas fa-heart" style="font-size: 15px;"></i><span>Feedback</span>
284
+ </a>
285
+
286
+ </div>
287
+ TabOverviewAI
288
+ </nav>
289
+ <div class="cont">
290
+ <div class="bar-1">
291
+ <button id="sendUrlButton" class="button">Get Summary</button>
292
+ <button id="copyButton" class="copybtn" disabled><i class="fa fa-copy" style="font-size:18px"></i></button>
293
+ </div>
294
+ <div id="output" class="output">Click 'Get Summary' to get overview of this site</div>
295
+ </div>
296
+ <div id="loadingModal" class="modal">
297
+ <div class="modal-content">
298
+ <i class="fa fa-spinner fa-spin"></i> Generating...
299
+ </div>
300
+ </div>
301
+ <div class="footer">
302
+ TabOverviewAI.
303
+ </div>
304
+
305
+ <script src="popup.js"></script>
306
+
307
+ </body>
308
+ </html>
popup.js ADDED
@@ -0,0 +1,134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ document.addEventListener('DOMContentLoaded', function() {
2
+ // Event listener to handle button click
3
+ var sendUrlButton = document.getElementById('sendUrlButton');
4
+ var loadingModal = document.getElementById('loadingModal');
5
+ var copyButton = document.getElementById('copyButton');
6
+
7
+ if (sendUrlButton) {
8
+ sendUrlButton.addEventListener('click', sendUrlContentToBackend);
9
+ } else {
10
+ console.error('Element with id "sendUrlButton" not found.');
11
+ }
12
+
13
+ // Event listener for copy button
14
+ if (copyButton) {
15
+ copyButton.addEventListener('click', copyToClipboard);
16
+ } else {
17
+ console.error('Element with id "copyButton" not found.');
18
+ }
19
+
20
+ // Function to send current tab content to backend server
21
+ function sendUrlContentToBackend() {
22
+ chrome.tabs.query({ active: true, currentWindow: true }, function(tabs) {
23
+ var currentTab = tabs[0];
24
+ var currentTabUrl = currentTab.url;
25
+
26
+ chrome.scripting.executeScript({
27
+ target: { tabId: currentTab.id },
28
+ func: extractTextFromPage,
29
+ args: []
30
+ }, function(results) {
31
+ var content = results[0].result;
32
+
33
+ var requestData = {
34
+ url: currentTabUrl,
35
+ html_content: content.html,
36
+ js_content: content.js
37
+ };
38
+ // Display loading indicator
39
+ loadingModal.style.display = 'block';
40
+ console.log('Sending data to server:', requestData);
41
+ // Send data to server using fetch API
42
+ fetch('https://taboverviewai.onrender.com/generate_summary', {
43
+ method: 'POST',
44
+ headers: {
45
+ 'Content-Type': 'application/json'
46
+ },
47
+ body: JSON.stringify(requestData)
48
+ })
49
+ .then(response => {
50
+ if (!response.ok) {
51
+ throw new Error('Network response was not ok');
52
+ }
53
+ return response.json();
54
+ })
55
+ .then(data => {
56
+ console.log('Response from server:', data);
57
+ var outputDiv = document.getElementById('output');
58
+ outputDiv.innerHTML = formatResponseText(data.ai_response);
59
+ document.getElementById("sendUrlButton").textContent = "ReGenerate";
60
+ document.getElementById('copyButton').disabled = false;
61
+ document.body.classList.add('top');
62
+ })
63
+ .catch(error => {
64
+ console.error('Error sending URL content to server:', error);
65
+ })
66
+ .finally(() => {
67
+ // Hide loading indicator
68
+ loadingModal.style.display = 'none';
69
+ });
70
+ });
71
+ });
72
+ }
73
+
74
+ function extractTextFromPage() {
75
+ function extractText(node) {
76
+ let text = '';
77
+ if (node.nodeType === Node.TEXT_NODE) {
78
+ text += node.textContent.trim() + ' ';
79
+ } else if (node.nodeType === Node.ELEMENT_NODE) {
80
+ if (node.tagName === 'P' || node.tagName === 'SPAN' || node.tagName.match(/^H[1-6]$/)) {
81
+ text += node.textContent.trim() + ' ';
82
+ }
83
+ }
84
+ return text;
85
+ }
86
+
87
+ var htmlContent = '';
88
+ var nodes = document.body.querySelectorAll('p, span, h1, h2, h3, h4, h5, h6');
89
+ nodes.forEach(node => {
90
+ htmlContent += extractText(node);
91
+ });
92
+
93
+ var scriptContent = Array.from(document.getElementsByTagName('script')).map(s => extractText(s)).join(' ');
94
+
95
+ return { html: htmlContent, js: scriptContent };
96
+ }
97
+
98
+ // Function to format response text
99
+ function formatResponseText(text) {
100
+ text = text.replace(/\*\*(.*?)\*\*/g, '<br><b>$1</b>');
101
+ text = text.replace(/\*/g, '');
102
+ text = text.replace(/\*\*(.*?)\*\*/g, '<b>$1</b>');
103
+ return text;
104
+ }
105
+
106
+ // Copy to clipboard function
107
+ function copyToClipboard() {
108
+ var outputText = document.getElementById('output').textContent;
109
+ navigator.clipboard.writeText(outputText)
110
+ console.log("Showing copied message"); // Debugging line
111
+ var message = document.createElement('div');
112
+ message.className = 'copied-message';
113
+ message.textContent = 'Copied';
114
+ document.body.appendChild(message);
115
+
116
+ setTimeout(function() {
117
+ message.remove();
118
+ }, 2000);
119
+ }
120
+
121
+ // Event listener for signin link
122
+ var signinLink = document.getElementById('signinLink');
123
+ if (signinLink) {
124
+ signinLink.addEventListener('click', function(event) {
125
+ event.preventDefault();
126
+ document.getElementById('signinModal').style.display = 'block';
127
+ });
128
+ }
129
+
130
+ // Function to close the signin modal
131
+ function closeSigninModal() {
132
+ document.getElementById('signinModal').style.display = 'none';
133
+ }
134
+ });
templates/popup.html ADDED
@@ -0,0 +1,274 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>My Extension</title>
5
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
6
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
7
+ <link href="https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&display=swap" rel="stylesheet">
8
+ <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
9
+ <style>
10
+ body {
11
+ width: 100%;
12
+
13
+ font-family: 'Poppins', sans-serif;
14
+ display: flex;
15
+ flex-direction: column;
16
+ align-items: center;
17
+ background: linear-gradient(135deg, #f5f7fa, #ffffff);
18
+ margin: 0;
19
+ padding: 0;
20
+
21
+ border-radius: 10px;
22
+ }
23
+
24
+ nav {
25
+ width: 100%;
26
+ text-align: center;
27
+ background-color: #3571ff;
28
+ color: #ffffff;
29
+ font-size: 24px;
30
+ padding: 15px 0;
31
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
32
+ z-index: 1000;
33
+ position: fixed;
34
+ top: 0;
35
+ }
36
+
37
+ .cont {
38
+ margin-top: 80px; /* Adjusted to give space for the fixed nav */
39
+ flex-grow: 1;
40
+ display: flex;
41
+ flex-direction: column;
42
+ align-items: center;
43
+ width: 100%;
44
+ padding: 20px;
45
+ box-sizing: border-box;
46
+ }
47
+
48
+ .output {
49
+ font-size: 28px;
50
+ background: #ffffff;
51
+ padding: 15px;
52
+ border-radius: 5px;
53
+ width: 100%;
54
+ text-align: center;
55
+ margin-bottom: 40px;
56
+ margin-top: 20px;
57
+ height: 100%;
58
+ font-weight: 700;
59
+ }
60
+
61
+ #output p {
62
+ margin: 0;
63
+ }
64
+
65
+ .bar-1 {
66
+
67
+ justify-content: space-between;
68
+ align-items: center;
69
+ width: 100%;
70
+ margin-bottom: 20px;
71
+ text-align: center;
72
+ }
73
+
74
+ .button, .copybtn {
75
+ padding: 20px;
76
+ font-size: 18px;
77
+ font-weight: 700;
78
+ cursor: pointer;
79
+ border: none;
80
+ border-radius: 5px;
81
+ background-color: #4caf50;
82
+ color: #ffffff;
83
+ transition: background-color 0.3s ease-in-out, transform 0.3s;
84
+ }
85
+
86
+ .button:hover, .copybtn:hover {
87
+ background-color: #45a049;
88
+ transform: translateY(-2px);
89
+ }
90
+
91
+ .button:active, .copybtn:active {
92
+ background-color: #3e8e41;
93
+ transform: translateY(0);
94
+ }
95
+
96
+ .copybtn[disabled] {
97
+ background-color: #ccc;
98
+ cursor: not-allowed;
99
+ }
100
+
101
+ .copied-message {
102
+ width: 100px;
103
+ position: fixed;
104
+ bottom: 50%;
105
+ left: 50%;
106
+ transform: translateX(-50%);
107
+ background-color: #4caf50;
108
+ color: white;
109
+ padding: 10px 20px;
110
+ border-radius: 5px;
111
+ font-size: 16px;
112
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
113
+ }
114
+
115
+ .footer {
116
+ width: 100%;
117
+ background-color: #333;
118
+ color: #fff;
119
+ text-align: center;
120
+ padding: 10px 0;
121
+ position: fixed;
122
+ bottom: 0;
123
+ }
124
+
125
+ .modal {
126
+ display: none;
127
+ position: fixed;
128
+ z-index: 1000;
129
+ left: 0;
130
+ top: 0;
131
+ width: 100%;
132
+ height: 100%;
133
+ overflow: auto;
134
+ background-color: rgba(0, 0, 0, 0.5);
135
+ }
136
+
137
+ .modal-content {
138
+ position: absolute;
139
+ top: 50%;
140
+ left: 50%;
141
+ transform: translate(-50%, -50%);
142
+ background-color: #fff;
143
+ padding: 20px;
144
+ border-radius: 10px;
145
+ text-align: center;
146
+ font-size: 20px;
147
+ color: #4caf50;
148
+ }
149
+
150
+ .signin-modal-content {
151
+ font-size: 20px;
152
+ color: #000;
153
+ }
154
+
155
+ .sidebar {
156
+ position: fixed;
157
+ width: 150px;
158
+ left: -150px;
159
+ height: 100%;
160
+ background-color: #ebf5ff;
161
+ box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
162
+ transition: all 0.5s ease;
163
+ z-index: 1000;
164
+ }
165
+
166
+ .sidebar header {
167
+ font-size: 17px;
168
+ color: #DBE2EF;
169
+ line-height: 52px;
170
+ text-align: center;
171
+ background-color: #3571ff;
172
+ user-select: none;
173
+ font-weight: 700;
174
+ }
175
+
176
+ .sidebar a {
177
+ font-size: 15px;
178
+ display: block;
179
+ height: 60px;
180
+ width: 140px;
181
+ color: #000000;
182
+ line-height: 60px;
183
+ padding-left: 10px;
184
+ padding-bottom: 10px;
185
+ box-sizing: border-box;
186
+ border-left: 5px solid transparent;
187
+ text-decoration: none;
188
+ transition: all 0.3s ease;
189
+ }
190
+
191
+ .sidebar a:hover, .sidebar a.active {
192
+ border-left: 5px solid #3571ff;
193
+ background-color: #8cadfa;
194
+ color: #fff;
195
+ }
196
+
197
+ .sidebar a i {
198
+ font-size: 17px;
199
+ margin-right: 10px;
200
+ }
201
+
202
+ .sidebar a span {
203
+ letter-spacing: 1px;
204
+ text-transform: uppercase;
205
+ }
206
+
207
+ #check {
208
+ display: none;
209
+ position: fixed;
210
+ top: 15px;
211
+ left: 15px;
212
+ }
213
+
214
+ label #btn, label #cancel {
215
+ position: fixed;
216
+ left: 10px;
217
+ cursor: pointer;
218
+ color: #fff;
219
+ border-radius: 5px;
220
+ margin-bottom: 2px;
221
+ margin-left: 2px;
222
+ margin-right: 2px;
223
+ font-size: 20px;
224
+ background-color: #3571ff;
225
+ padding: 10px;
226
+ transition: all 0.5s ease;
227
+ z-index: 1100;
228
+ }
229
+
230
+ label #cancel {
231
+ opacity: 0;
232
+ visibility: hidden;
233
+ }
234
+
235
+ #check:checked ~ .sidebar {
236
+ left: 0;
237
+ }
238
+
239
+ #check:checked ~ label #btn {
240
+ opacity: 0;
241
+ visibility: hidden;
242
+ }
243
+
244
+ #check:checked ~ label #cancel {
245
+ opacity: 1;
246
+ visibility: visible;
247
+ }
248
+ </style>
249
+ </head>
250
+ <body>
251
+ <nav>
252
+ <input type="checkbox" id="check">
253
+ <label for="check">
254
+ <i class="fas fa-times" id="cancel" style="font-size: 15px;"></i>
255
+ </label>
256
+
257
+ TabOverviewAI
258
+ </nav>
259
+ <div class="cont">
260
+ <div id="output" class="output">Unlocking the power of current tab summarization—transforming browsing experiences with seamless, AI-driven content distillation.</div>
261
+
262
+ <div class="bar-1">
263
+ <button id="sendUrlButton" class="button">Add Now</button>
264
+ </div>
265
+ </div>
266
+
267
+ <div class="footer">
268
+ TabOverviewAI.
269
+ </div>
270
+
271
+
272
+
273
+ </body>
274
+ </html>