@dynamicu/chromedebug-mcp 2.7.0 → 2.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
  // Chrome Debug Extension Popup Script v2.0
2
2
  const EXTENSION_VERSION = '2.0.4-BUILD-20250119';
3
- console.log(`[popup.js] Loaded version: ${EXTENSION_VERSION}`);
3
+ // console.log(`[popup.js] Loaded version: ${EXTENSION_VERSION}`);
4
4
 
5
- // Chrome Web Store URLs for upgrade flow
6
- const CHROME_STORE_PRO_URL = 'https://chrome.google.com/webstore/detail/chromedebug-mcp-pro/[PRO_EXTENSION_ID]';
5
+ // LemonSqueezy purchase URL for PRO upgrade
6
+ const PRO_PURCHASE_URL = 'https://chromedebug.com/buy/996773cb-682b-430f-b9e3-9ce2130bd967';
7
7
  const IS_PRO_VERSION = chrome.runtime.getManifest().name.includes('PRO');
8
8
 
9
9
  // Global variables for recording functionality
@@ -57,13 +57,10 @@ function showToast(message, duration = 2000, type = 'info') {
57
57
 
58
58
  // Loading overlay helper functions
59
59
  function showSectionLoading(sectionId, message = 'Loading...') {
60
- console.log(`showSectionLoading called for: ${sectionId} with message: ${message}`);
61
60
  const section = document.getElementById(sectionId);
62
61
  if (!section) {
63
- console.error(`Section not found: ${sectionId}`);
64
62
  return;
65
63
  }
66
- console.log(`Section found:`, section);
67
64
 
68
65
  // Remove any existing overlay first
69
66
  hideSectionLoading(sectionId);
@@ -76,7 +73,6 @@ function showSectionLoading(sectionId, message = 'Loading...') {
76
73
  `;
77
74
  overlay.setAttribute('data-loading-overlay', 'true');
78
75
  section.appendChild(overlay);
79
- console.log(`Overlay appended to section. Overlay:`, overlay);
80
76
  }
81
77
 
82
78
  function hideSectionLoading(sectionId) {
@@ -94,19 +90,12 @@ function updateWorkflowRecordingUI() {
94
90
  const workflowBtn = document.getElementById('workflowRecordBtn');
95
91
  const workflowStatus = document.getElementById('workflowRecordingStatus');
96
92
  const saveRestorePointBtn = document.getElementById('saveRestorePointBtn');
97
-
98
- console.log('[Popup v2.0.6] updateWorkflowRecordingUI called, isWorkflowRecording:', isWorkflowRecording);
99
- console.log('[Popup v2.0.6] workflowBtn element exists?', !!workflowBtn);
100
-
93
+
101
94
  if (workflowBtn) {
102
95
  if (isWorkflowRecording) {
103
- console.log('[Popup v2.0.6] Updating button to STOP state');
104
- console.log('[Popup v2.0.6] Current button text:', workflowBtn.textContent);
105
96
  workflowBtn.textContent = 'Stop Workflow Recording';
106
97
  workflowBtn.style.background = '#e91e63';
107
98
  workflowBtn.classList.add('recording');
108
- console.log('[Popup v2.0.6] Button updated - new text:', workflowBtn.textContent);
109
- console.log('[Popup v2.0.6] Button classes:', workflowBtn.className);
110
99
  startWorkflowTimer();
111
100
  // Show restore point button during recording
112
101
  if (saveRestorePointBtn) {
@@ -337,7 +326,7 @@ function testSiteAccess(hostname, mode, allowedSites, restrictedSites) {
337
326
 
338
327
  // Function definitions (outside DOMContentLoaded for proper scope)
339
328
  async function checkServerStatus() {
340
- console.log('[popup.js] checkServerStatus() called');
329
+ // console.log('[popup.js] checkServerStatus() called');
341
330
  const statusEl = document.getElementById('serverStatus');
342
331
  const statusTextEl = document.getElementById('statusText');
343
332
 
@@ -364,7 +353,7 @@ async function checkServerStatus() {
364
353
  clearTimeout(timeoutId);
365
354
  // Only log successful connections to reduce console noise
366
355
  if (response.ok) {
367
- console.log(`[popup.js] ✓ Connected to server on port ${port}`);
356
+ // console.log(`[popup.js] ✓ Connected to server on port ${port}`);
368
357
  }
369
358
  return response.ok;
370
359
  } catch (error) {
@@ -420,7 +409,7 @@ async function checkServerStatus() {
420
409
  if (connected && connectedPort) {
421
410
  await chrome.storage.local.set({ lastSuccessfulPort: connectedPort });
422
411
  } else {
423
- console.log('[popup.js] No server found - browser-only mode active');
412
+ // console.log('[popup.js] No server found - browser-only mode active');
424
413
  }
425
414
 
426
415
  if (connected) {
@@ -607,7 +596,7 @@ function takeManualSnapshot() {
607
596
  }
608
597
 
609
598
  if (response && response.success) {
610
- console.log('Manual snapshot taken successfully');
599
+ // console.log('Manual snapshot taken successfully');
611
600
  // Show brief feedback
612
601
  const manualSnapshotBtn = document.getElementById('manualSnapshotBtn');
613
602
  if (manualSnapshotBtn) {
@@ -662,7 +651,7 @@ function takeManualSnapshot() {
662
651
  */
663
652
  /*
664
653
  async function takeSnapshot() {
665
- console.log('Taking standalone snapshot...');
654
+ // console.log('Taking standalone snapshot...');
666
655
 
667
656
  try {
668
657
  const serverStatus = await checkServerStatus();
@@ -719,7 +708,7 @@ async function takeSnapshot() {
719
708
  }
720
709
 
721
710
  if (response && response.success) {
722
- console.log('Snapshot taken successfully:', response.sessionId);
711
+ // console.log('Snapshot taken successfully:', response.sessionId);
723
712
  const recordingStatus = document.getElementById('recordingStatus');
724
713
  if (recordingStatus) {
725
714
  recordingStatus.innerHTML = `<strong style="color: #4CAF50;">Snapshot saved!</strong>`;
@@ -962,7 +951,7 @@ function updateRecordingsDisplay(recordings) {
962
951
  }
963
952
  } catch (error) {
964
953
  // Free version - show upgrade prompt
965
- console.log('[ChromePilot Free] Frame editor not available - showing upgrade prompt');
954
+ // console.log('[ChromePilot Free] Frame editor not available - showing upgrade prompt');
966
955
  alert('Frame Editor is a Pro feature. Upgrade to ChromePilot Pro to view detailed frame recordings with console logs and advanced debugging tools.');
967
956
  }
968
957
  });
@@ -979,7 +968,7 @@ function initializeTierStatus() {
979
968
  const licenseSection = document.getElementById('license-section');
980
969
  if (licenseSection) {
981
970
  licenseSection.style.display = 'none';
982
- console.log('[Tier] PRO version detected - hiding license section');
971
+ // console.log('[Tier] PRO version detected - hiding license section');
983
972
  }
984
973
  } else {
985
974
  // Show FREE tier status (no license validation)
@@ -994,7 +983,7 @@ function initializeTierStatus() {
994
983
  // Fetch and display current usage count
995
984
  updateUsageDisplay();
996
985
 
997
- console.log('[Tier] FREE version - showing usage counter');
986
+ // console.log('[Tier] FREE version - showing usage counter');
998
987
  }
999
988
  }
1000
989
 
@@ -1016,21 +1005,21 @@ async function updateUsageDisplay() {
1016
1005
  usageLimitEl.textContent = response.limit || 5;
1017
1006
  }
1018
1007
 
1019
- console.log(`[Usage] Display updated: ${response.count}/${response.limit}`);
1008
+ // console.log(`[Usage] Display updated: ${response.count}/${response.limit}`);
1020
1009
  }
1021
1010
  } catch (error) {
1022
1011
  console.error('[Usage] Failed to fetch usage:', error);
1023
1012
  }
1024
1013
  }
1025
1014
 
1026
- // Upgrade button handler - redirect to Chrome Web Store PRO version
1015
+ // Upgrade button handler - redirect to LemonSqueezy purchase page
1027
1016
  function handleUpgradeClick() {
1028
- console.log('[Upgrade] Opening Chrome Web Store PRO version');
1029
- chrome.tabs.create({url: CHROME_STORE_PRO_URL});
1017
+ // console.log('[Upgrade] Opening LemonSqueezy PRO purchase page');
1018
+ chrome.tabs.create({url: PRO_PURCHASE_URL});
1030
1019
  }
1031
1020
 
1032
1021
  document.addEventListener('DOMContentLoaded', () => {
1033
- console.log('DOM loaded, initializing popup');
1022
+ // console.log('DOM loaded, initializing popup');
1034
1023
 
1035
1024
  // Initialize tier status display
1036
1025
  initializeTierStatus();
@@ -1041,6 +1030,21 @@ document.addEventListener('DOMContentLoaded', () => {
1041
1030
  upgradeBtn.addEventListener('click', handleUpgradeClick);
1042
1031
  }
1043
1032
 
1033
+ // Settings button handler - open options page
1034
+ const settingsBtn = document.getElementById('settings-btn');
1035
+ if (settingsBtn) {
1036
+ settingsBtn.addEventListener('click', () => {
1037
+ chrome.runtime.openOptionsPage();
1038
+ });
1039
+ // Add hover effect
1040
+ settingsBtn.addEventListener('mouseenter', () => {
1041
+ settingsBtn.style.opacity = '1';
1042
+ });
1043
+ settingsBtn.addEventListener('mouseleave', () => {
1044
+ settingsBtn.style.opacity = '0.6';
1045
+ });
1046
+ }
1047
+
1044
1048
  // Function to update button states based on server status
1045
1049
  async function updateButtonStatesForServerStatus() {
1046
1050
  const serverStatus = await checkServerStatus();
@@ -1139,19 +1143,19 @@ document.addEventListener('DOMContentLoaded', () => {
1139
1143
  clearInterval(serverPollingInterval);
1140
1144
  }
1141
1145
  serverPollingInterval = setInterval(updateButtonStatesForServerStatus, 3000);
1142
- console.log('Server polling started (every 3 seconds)');
1146
+ // console.log('Server polling started (every 3 seconds)');
1143
1147
  }
1144
1148
 
1145
1149
  function stopPolling() {
1146
1150
  if (serverPollingInterval) {
1147
1151
  clearInterval(serverPollingInterval);
1148
1152
  serverPollingInterval = null;
1149
- console.log('Server polling stopped');
1153
+ // console.log('Server polling stopped');
1150
1154
  }
1151
1155
  }
1152
1156
 
1153
1157
  async function checkServerOnce() {
1154
- console.log('Running single server check...');
1158
+ // console.log('Running single server check...');
1155
1159
  await updateButtonStatesForServerStatus();
1156
1160
  }
1157
1161
 
@@ -1194,7 +1198,7 @@ document.addEventListener('DOMContentLoaded', () => {
1194
1198
  stopPolling();
1195
1199
  }
1196
1200
 
1197
- console.log('Continuous polling:', isChecked ? 'enabled' : 'disabled');
1201
+ // console.log('Continuous polling:', isChecked ? 'enabled' : 'disabled');
1198
1202
  });
1199
1203
 
1200
1204
  // Retry button click handler
@@ -1223,7 +1227,7 @@ document.addEventListener('DOMContentLoaded', () => {
1223
1227
  // Save changes when checkbox is clicked
1224
1228
  enhancedCaptureCheckbox.addEventListener('change', () => {
1225
1229
  chrome.storage.local.set({ enhancedClickCapture: enhancedCaptureCheckbox.checked });
1226
- console.log('Enhanced click capture setting changed to:', enhancedCaptureCheckbox.checked);
1230
+ // console.log('Enhanced click capture setting changed to:', enhancedCaptureCheckbox.checked);
1227
1231
  });
1228
1232
  }
1229
1233
 
@@ -1350,10 +1354,10 @@ document.addEventListener('DOMContentLoaded', () => {
1350
1354
  isRecording = true;
1351
1355
  recordingStartTime = result.recordingStartTime || Date.now();
1352
1356
  updateRecordingUI();
1353
- console.log('Restored recording state from storage');
1357
+ // console.log('Restored recording state from storage');
1354
1358
  } else if (result.pendingRecording && result.pendingTabId) {
1355
1359
  // Auto-start recording for the pending tab
1356
- console.log('Found pending recording for tab:', result.pendingTabId);
1360
+ // console.log('Found pending recording for tab:', result.pendingTabId);
1357
1361
  const targetTabId = result.pendingTabId;
1358
1362
  chrome.storage.local.remove(['pendingRecording', 'pendingTabId']);
1359
1363
 
@@ -1382,10 +1386,10 @@ document.addEventListener('DOMContentLoaded', () => {
1382
1386
  const recordingStatus = document.getElementById('recordingStatus');
1383
1387
 
1384
1388
  if (recordBtn) {
1385
- console.log('Setting up record button handler');
1389
+ // console.log('Setting up record button handler');
1386
1390
  recordBtn.addEventListener('click', async (e) => {
1387
1391
  e.preventDefault();
1388
- console.log('Record button clicked, isRecording:', isRecording);
1392
+ // console.log('Record button clicked, isRecording:', isRecording);
1389
1393
 
1390
1394
  if (!isRecording && !isStoppingRecording) {
1391
1395
  try {
@@ -1394,16 +1398,16 @@ document.addEventListener('DOMContentLoaded', () => {
1394
1398
  const isBrowserOnlyMode = !serverStatus.connected;
1395
1399
 
1396
1400
  if (isBrowserOnlyMode) {
1397
- console.log('Starting recording in browser-only mode');
1401
+ // console.log('Starting recording in browser-only mode');
1398
1402
  // Browser-only mode - proceed with local storage
1399
1403
  } else {
1400
- console.log('Starting recording with server');
1404
+ // console.log('Starting recording with server');
1401
1405
  }
1402
1406
 
1403
1407
  // Check FREE tier usage limit before starting
1404
1408
  const usageCheck = await chrome.runtime.sendMessage({ action: 'checkUsageLimit' });
1405
1409
  if (usageCheck && !usageCheck.allowed) {
1406
- console.log('[Usage] Daily limit reached:', usageCheck);
1410
+ // console.log('[Usage] Daily limit reached:', usageCheck);
1407
1411
  if (recordingStatus) {
1408
1412
  recordingStatus.innerHTML = '<strong style="color: #f44336;">Daily limit reached</strong><br>' +
1409
1413
  `<small>${usageCheck.count}/${usageCheck.limit} recordings used today.<br>Upgrade to Pro for unlimited.</small>`;
@@ -1413,7 +1417,7 @@ document.addEventListener('DOMContentLoaded', () => {
1413
1417
 
1414
1418
  // Get the current active tab
1415
1419
  const [tab] = await chrome.tabs.query({ active: true, currentWindow: true });
1416
- console.log('Current tab:', tab);
1420
+ // console.log('Current tab:', tab);
1417
1421
 
1418
1422
  if (!tab || !tab.id) {
1419
1423
  console.error('No active tab found');
@@ -1457,7 +1461,7 @@ document.addEventListener('DOMContentLoaded', () => {
1457
1461
  }
1458
1462
 
1459
1463
  if (response && response.success) {
1460
- console.log('Recording started successfully');
1464
+ // console.log('Recording started successfully');
1461
1465
  isRecording = true;
1462
1466
  recordingStartTime = Date.now();
1463
1467
 
@@ -1480,7 +1484,7 @@ document.addEventListener('DOMContentLoaded', () => {
1480
1484
  }
1481
1485
  } else if (isRecording && !isStoppingRecording) {
1482
1486
  // Stop recording
1483
- console.log('Stopping recording...');
1487
+ // console.log('Stopping recording...');
1484
1488
  isStoppingRecording = true;
1485
1489
  recordBtn.textContent = 'Stopping...';
1486
1490
  recordBtn.disabled = true;
@@ -1499,19 +1503,16 @@ document.addEventListener('DOMContentLoaded', () => {
1499
1503
  }
1500
1504
 
1501
1505
  if (response && response.success) {
1502
- console.log('Recording stopped successfully', response);
1506
+ // console.log('Recording stopped successfully', response);
1503
1507
  isRecording = false;
1504
1508
  updateRecordingUI();
1505
1509
 
1506
- console.log('About to show loading overlay for screen-recording-section');
1507
1510
  // Show loading overlay over screen recording section
1508
1511
  showSectionLoading('screen-recording-section', 'Saving screen recording...');
1509
- console.log('Loading overlay should be visible now');
1510
1512
 
1511
1513
  // Use then/catch instead of async/await since we're in a callback
1512
1514
  loadScreenRecordings(true)
1513
1515
  .then(() => {
1514
- console.log('Screen recordings loaded successfully');
1515
1516
  // Show success toast
1516
1517
  const frameCount = response.frameCount || 0;
1517
1518
  const duration = response.duration || '0s';
@@ -1522,7 +1523,6 @@ document.addEventListener('DOMContentLoaded', () => {
1522
1523
  showToast('Error loading recordings. Please refresh.', 3000, 'error');
1523
1524
  })
1524
1525
  .finally(() => {
1525
- console.log('Hiding loading overlay');
1526
1526
  // Always hide loading overlay
1527
1527
  hideSectionLoading('screen-recording-section');
1528
1528
  });
@@ -1592,7 +1592,7 @@ document.addEventListener('DOMContentLoaded', () => {
1592
1592
  // Check FREE tier usage limit before starting
1593
1593
  const usageCheck = await chrome.runtime.sendMessage({ action: 'checkUsageLimit' });
1594
1594
  if (usageCheck && !usageCheck.allowed) {
1595
- console.log('[Usage] Daily limit reached:', usageCheck);
1595
+ // console.log('[Usage] Daily limit reached:', usageCheck);
1596
1596
  const workflowStatus = document.getElementById('workflowRecordingStatus');
1597
1597
  if (workflowStatus) {
1598
1598
  workflowStatus.innerHTML = '<strong style="color: #f44336;">Daily limit reached</strong><br>' +
@@ -1624,23 +1624,16 @@ document.addEventListener('DOMContentLoaded', () => {
1624
1624
  }
1625
1625
 
1626
1626
  // Send message to background script to start recording
1627
- console.log('[Popup v2.0.6] Sending startWorkflowRecording message to background');
1628
- chrome.runtime.sendMessage({
1627
+ chrome.runtime.sendMessage({
1629
1628
  action: 'startWorkflowRecording',
1630
1629
  tabId: tab.id,
1631
1630
  includeLogsInExport: includeLogsInExport,
1632
1631
  sessionName: sessionName,
1633
1632
  screenshotSettings: screenshotSettings
1634
1633
  }, (response) => {
1635
- console.log('[Popup v2.0.6] Received response from background:', response);
1636
- console.log('[Popup v2.0.6] chrome.runtime.lastError:', chrome.runtime.lastError);
1637
- console.log('[Popup v2.0.6] Checking which branch will execute...');
1638
-
1639
1634
  if (chrome.runtime.lastError) {
1640
- console.error('[Popup v2.0.6] RUNTIME ERROR BRANCH:', chrome.runtime.lastError);
1641
1635
  // Check if this tab allows content script injection
1642
1636
  if (!tab.url || tab.url.startsWith('chrome://') || tab.url.startsWith('chrome-extension://') || tab.url.startsWith('moz-extension://')) {
1643
- console.log('Cannot inject content script into restricted URL:', tab.url);
1644
1637
  return;
1645
1638
  }
1646
1639
  // Inject content script if needed
@@ -1686,31 +1679,17 @@ document.addEventListener('DOMContentLoaded', () => {
1686
1679
  });
1687
1680
  });
1688
1681
  } else if (response && response.success) {
1689
- console.log('[Popup v2.0.6] *** SUCCESS BRANCH REACHED! ***');
1690
- console.log('[Popup v2.0.6] Workflow recording started successfully, updating UI now');
1691
- console.log('[Popup v2.0.6] Setting isWorkflowRecording = true');
1692
1682
  isWorkflowRecording = true;
1693
1683
  // Save state and start time to storage
1694
1684
  const startTime = Date.now();
1695
- chrome.storage.local.set({
1685
+ chrome.storage.local.set({
1696
1686
  workflowRecording: true,
1697
1687
  workflowStartTime: startTime
1698
1688
  });
1699
1689
  workflowStartTime = startTime;
1700
- console.log('[Popup v2.0.6] About to call updateWorkflowRecordingUI()');
1701
1690
  updateWorkflowRecordingUI();
1702
- console.log('[Popup v2.0.6] updateWorkflowRecordingUI() call completed');
1703
1691
  // Hide any previous results
1704
1692
  if (workflowRecordingsList) workflowRecordingsList.style.display = 'none';
1705
- } else {
1706
- console.error('[Popup v2.0.6] *** ELSE BRANCH - Unexpected response ***');
1707
- console.error('[Popup v2.0.6] Response details:', {
1708
- exists: !!response,
1709
- success: response?.success,
1710
- type: typeof response,
1711
- keys: response ? Object.keys(response) : 'no response',
1712
- fullResponse: response
1713
- });
1714
1693
  }
1715
1694
  });
1716
1695
  } catch (error) {
@@ -1812,7 +1791,7 @@ document.addEventListener('DOMContentLoaded', () => {
1812
1791
  }
1813
1792
 
1814
1793
  if (response && response.success) {
1815
- console.log('Restore point created:', response.restorePointId);
1794
+ // console.log('Restore point created:', response.restorePointId);
1816
1795
  // Refresh restore points list
1817
1796
  loadRestorePoints();
1818
1797
  } else {
@@ -1946,7 +1925,7 @@ document.addEventListener('DOMContentLoaded', () => {
1946
1925
  }
1947
1926
 
1948
1927
  if (response && response.success) {
1949
- console.log('Successfully restored from point');
1928
+ // console.log('Successfully restored from point');
1950
1929
  } else {
1951
1930
  console.error('Failed to restore from point:', response);
1952
1931
  }
@@ -1968,7 +1947,7 @@ document.addEventListener('DOMContentLoaded', () => {
1968
1947
  });
1969
1948
 
1970
1949
  if (response.ok) {
1971
- console.log('Restore point deleted');
1950
+ // console.log('Restore point deleted');
1972
1951
  break;
1973
1952
  }
1974
1953
  } catch (error) {
@@ -2162,7 +2141,7 @@ async function loadWorkflowRecordings(autoShow = false) {
2162
2141
  const response = await fetch(`http://localhost:${port}/chromedebug/workflow-recordings`);
2163
2142
  if (response.ok) {
2164
2143
  const data = await response.json();
2165
- console.log('Loaded workflow recordings from port', port, ':', data);
2144
+ // console.log('Loaded workflow recordings from port', port, ':', data);
2166
2145
 
2167
2146
  // Handle both data.recordings and direct array response
2168
2147
  const recordings = data.recordings || data;
@@ -2257,7 +2236,7 @@ async function loadWorkflowRecordings(autoShow = false) {
2257
2236
  playBtn.addEventListener('click', () => playWorkflow(recording.session_id));
2258
2237
 
2259
2238
  deleteBtn.addEventListener('click', () => {
2260
- console.log('Delete clicked for recording:', recording);
2239
+ // console.log('Delete clicked for recording:', recording);
2261
2240
  const recordingId = recording.id || recording.session_id;
2262
2241
  if (!recordingId) {
2263
2242
  console.error('No ID found for recording:', recording);
@@ -2315,7 +2294,7 @@ async function loadWorkflowRecordings(autoShow = false) {
2315
2294
 
2316
2295
  // Function to play a workflow
2317
2296
  async function playWorkflow(sessionId) {
2318
- console.log('Playing workflow:', sessionId);
2297
+ // console.log('Playing workflow:', sessionId);
2319
2298
 
2320
2299
  try {
2321
2300
  // Get the current active tab
@@ -2395,7 +2374,7 @@ async function playWorkflow(sessionId) {
2395
2374
  }, 100);
2396
2375
  });
2397
2376
  } else if (response && response.success) {
2398
- console.log('Workflow playback started');
2377
+ // console.log('Workflow playback started');
2399
2378
  }
2400
2379
  });
2401
2380
  } catch (error) {
@@ -2475,11 +2454,11 @@ async function loadScreenRecordings(autoShow = false) {
2475
2454
 
2476
2455
  // First, load browser-only recordings from IndexedDB
2477
2456
  try {
2478
- console.log('[Popup] Requesting browser-only recordings...');
2457
+ // console.log('[Popup] Requesting browser-only recordings...');
2479
2458
  const browserRecordings = await chrome.runtime.sendMessage({
2480
2459
  action: 'getBrowserRecordings'
2481
2460
  });
2482
- console.log('[Popup] Browser recordings received:', browserRecordings);
2461
+ // console.log('[Popup] Browser recordings received:', browserRecordings);
2483
2462
 
2484
2463
  if (browserRecordings && browserRecordings.length > 0) {
2485
2464
  hasRecordings = true;
@@ -2619,10 +2598,10 @@ async function loadScreenRecordings(autoShow = false) {
2619
2598
  const formattedDate = date.toLocaleString();
2620
2599
 
2621
2600
  // Use session name if available, otherwise use session ID
2622
- console.log('Recording data:', recording);
2623
- console.log('Recording name:', recording.name);
2601
+ // console.log('Recording data:', recording);
2602
+ // console.log('Recording name:', recording.name);
2624
2603
  const displayName = recording.name || `Recording ${recording.sessionId}`;
2625
- console.log('Display name:', displayName);
2604
+ // console.log('Display name:', displayName);
2626
2605
 
2627
2606
  recordingItem.innerHTML = `
2628
2607
  <div class="recording-info">
@@ -2926,7 +2905,7 @@ chrome.storage.onChanged.addListener((changes, namespace) => {
2926
2905
  const usageLimitEl = document.getElementById('usage-limit');
2927
2906
  if (usageCountEl) usageCountEl.textContent = usage.count || 0;
2928
2907
  if (usageLimitEl) usageLimitEl.textContent = '5'; // FREE tier limit
2929
- console.log(`[Usage] Storage updated: ${usage.count}/5`);
2908
+ // console.log(`[Usage] Storage updated: ${usage.count}/5`);
2930
2909
  }
2931
2910
  }
2932
2911
  }
@@ -2934,9 +2913,9 @@ chrome.storage.onChanged.addListener((changes, namespace) => {
2934
2913
 
2935
2914
  // Listen for messages from background script
2936
2915
  chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
2937
- console.log('Popup received message:', request);
2916
+ // console.log('Popup received message:', request);
2938
2917
  if (request.action === 'uploadComplete') {
2939
- console.log('Upload complete with ID:', request.recordingId);
2918
+ // console.log('Upload complete with ID:', request.recordingId);
2940
2919
  const recordingStatus = document.getElementById('recordingStatus');
2941
2920
  if (recordingStatus) {
2942
2921
  recordingStatus.innerHTML = `<strong style="color: #4CAF50;">Recording saved!</strong>`;
@@ -2948,7 +2927,7 @@ chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
2948
2927
  if (recordingStatus) recordingStatus.textContent = '';
2949
2928
  }, 3000);
2950
2929
  } else if (request.action === 'sessionComplete') {
2951
- console.log('Session complete:', request.sessionId, 'with', request.totalChunks, 'chunks');
2930
+ // console.log('Session complete:', request.sessionId, 'with', request.totalChunks, 'chunks');
2952
2931
  const recordingStatus = document.getElementById('recordingStatus');
2953
2932
  if (recordingStatus) {
2954
2933
  recordingStatus.innerHTML = `<strong style="color: #4CAF50;">Recording session saved!</strong><br>` +
@@ -2961,7 +2940,7 @@ chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
2961
2940
  if (recordingStatus) recordingStatus.textContent = '';
2962
2941
  }, 5000);
2963
2942
  } else if (request.action === 'frameSessionComplete') {
2964
- console.log('Frame session complete:', request.sessionId, 'with', request.totalFrames, 'frames');
2943
+ // console.log('Frame session complete:', request.sessionId, 'with', request.totalFrames, 'frames');
2965
2944
  const recordingStatus = document.getElementById('recordingStatus');
2966
2945
  if (recordingStatus) {
2967
2946
  recordingStatus.innerHTML = `<strong style="color: #4CAF50;">Recording saved!</strong><br>` +
@@ -2974,11 +2953,11 @@ chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
2974
2953
  if (recordingStatus) recordingStatus.textContent = '';
2975
2954
  }, 5000);
2976
2955
  } else if (request.action === 'workflowRecordingSaved') {
2977
- console.log('Workflow recording saved:', request.workflowId);
2956
+ // console.log('Workflow recording saved:', request.workflowId);
2978
2957
  // Reload workflow recordings list to show the new recording
2979
2958
  loadWorkflowRecordings(true);
2980
2959
  } else if (request.action === 'recordingStopped') {
2981
- console.log('Recording stopped:', request.sessionId);
2960
+ // console.log('Recording stopped:', request.sessionId);
2982
2961
  // Reload screen recordings list immediately
2983
2962
  loadScreenRecordings(true);
2984
2963
  } else if (request.action === 'uploadError') {
@@ -353,6 +353,27 @@
353
353
  .frame-thumbnail:hover {
354
354
  transform: scale(1.05);
355
355
  }
356
+
357
+ /* Toast notification styles */
358
+ .toast {
359
+ position: fixed;
360
+ bottom: 20px;
361
+ left: 50%;
362
+ transform: translateX(-50%);
363
+ background: #333;
364
+ color: white;
365
+ padding: 12px 24px;
366
+ border-radius: 4px;
367
+ z-index: 1001;
368
+ animation: fadeInOut 2s ease-in-out forwards;
369
+ font-size: 14px;
370
+ }
371
+
372
+ @keyframes fadeInOut {
373
+ 0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
374
+ 15%, 85% { opacity: 1; transform: translateX(-50%) translateY(0); }
375
+ 100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
376
+ }
356
377
  </style>
357
378
  </head>
358
379
  <body>
@@ -370,6 +391,8 @@
370
391
  <button class="btn btn-secondary" id="invertSelectionBtn">Invert Selection</button>
371
392
  <button class="btn btn-danger" id="deleteSelectedBtn" disabled>Delete Selected</button>
372
393
  <button class="btn btn-primary" id="saveEditedBtn" disabled>Save as New Recording</button>
394
+ <button class="btn btn-secondary" id="copyIdBtn">Copy ID</button>
395
+ <button class="btn btn-secondary" id="copyPromptBtn">Copy Prompt</button>
373
396
  </div>
374
397
  </div>
375
398