@dynamicu/chromedebug-mcp 2.7.0 → 2.7.1

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.
@@ -48,13 +48,13 @@ class PerformanceMonitor {
48
48
  this.callbacks = { ...this.callbacks, ...callbacks };
49
49
 
50
50
  // Just prepare for monitoring, don't start yet (lazy loading)
51
- console.log('[PerformanceMonitor] Initialized (lazy mode - not started)');
51
+ // console.log('[PerformanceMonitor] Initialized (lazy mode - not started)');
52
52
  return true;
53
53
  }
54
54
 
55
55
  startMonitoring() {
56
56
  if (this.isMonitoring) {
57
- console.log('[PerformanceMonitor] Already monitoring');
57
+ // console.log('[PerformanceMonitor] Already monitoring');
58
58
  return;
59
59
  }
60
60
 
@@ -67,7 +67,7 @@ class PerformanceMonitor {
67
67
  // Start resource monitoring
68
68
  if (performance && performance.memory) {
69
69
  this.startResourceMonitoring();
70
- console.log('[PerformanceMonitor] Started with full performance tracking');
70
+ // console.log('[PerformanceMonitor] Started with full performance tracking');
71
71
  } else {
72
72
  console.warn('[PerformanceMonitor] Performance API not available, using basic monitoring');
73
73
  this.startBasicMonitoring();
@@ -77,13 +77,13 @@ class PerformanceMonitor {
77
77
  startWebVitalsCollection() {
78
78
  // Check if web-vitals library is available
79
79
  if (typeof webVitals !== 'undefined') {
80
- console.log('[PerformanceMonitor] Using web-vitals library');
80
+ // console.log('[PerformanceMonitor] Using web-vitals library');
81
81
 
82
82
  // Track LCP
83
83
  if (webVitals.onLCP) {
84
84
  const unsubscribeLCP = webVitals.onLCP((metric) => {
85
85
  this.stats.lcp = metric.value;
86
- console.log('[Web Vitals] LCP:', metric.value);
86
+ // console.log('[Web Vitals] LCP:', metric.value);
87
87
  this.checkWebVitalsThresholds('lcp', metric.value);
88
88
  });
89
89
  this.webVitalsUnsubscribers.push(unsubscribeLCP);
@@ -93,7 +93,7 @@ class PerformanceMonitor {
93
93
  if (webVitals.onCLS) {
94
94
  const unsubscribeCLS = webVitals.onCLS((metric) => {
95
95
  this.stats.cls = metric.value;
96
- console.log('[Web Vitals] CLS:', metric.value);
96
+ // console.log('[Web Vitals] CLS:', metric.value);
97
97
  this.checkWebVitalsThresholds('cls', metric.value);
98
98
  });
99
99
  this.webVitalsUnsubscribers.push(unsubscribeCLS);
@@ -103,7 +103,7 @@ class PerformanceMonitor {
103
103
  if (webVitals.onFID) {
104
104
  const unsubscribeFID = webVitals.onFID((metric) => {
105
105
  this.stats.fid = metric.value;
106
- console.log('[Web Vitals] FID:', metric.value);
106
+ // console.log('[Web Vitals] FID:', metric.value);
107
107
  });
108
108
  this.webVitalsUnsubscribers.push(unsubscribeFID);
109
109
  }
@@ -112,7 +112,7 @@ class PerformanceMonitor {
112
112
  if (webVitals.onINP) {
113
113
  const unsubscribeINP = webVitals.onINP((metric) => {
114
114
  this.stats.inp = metric.value;
115
- console.log('[Web Vitals] INP:', metric.value);
115
+ // console.log('[Web Vitals] INP:', metric.value);
116
116
  this.checkWebVitalsThresholds('inp', metric.value);
117
117
  });
118
118
  this.webVitalsUnsubscribers.push(unsubscribeINP);
@@ -122,12 +122,12 @@ class PerformanceMonitor {
122
122
  if (webVitals.onTTFB) {
123
123
  const unsubscribeTTFB = webVitals.onTTFB((metric) => {
124
124
  this.stats.ttfb = metric.value;
125
- console.log('[Web Vitals] TTFB:', metric.value);
125
+ // console.log('[Web Vitals] TTFB:', metric.value);
126
126
  });
127
127
  this.webVitalsUnsubscribers.push(unsubscribeTTFB);
128
128
  }
129
129
  } else {
130
- console.log('[PerformanceMonitor] web-vitals not available, using fallback PerformanceObserver');
130
+ // console.log('[PerformanceMonitor] web-vitals not available, using fallback PerformanceObserver');
131
131
  this.startPerformanceObserverFallback();
132
132
  }
133
133
  }
@@ -145,7 +145,7 @@ class PerformanceMonitor {
145
145
  for (const entry of list.getEntries()) {
146
146
  if (entry.entryType === 'largest-contentful-paint') {
147
147
  this.stats.lcp = entry.startTime;
148
- console.log('[Fallback] LCP:', entry.startTime);
148
+ // console.log('[Fallback] LCP:', entry.startTime);
149
149
  }
150
150
  }
151
151
  });
@@ -482,12 +482,12 @@ class PerformanceMonitor {
482
482
 
483
483
  setThresholds(newThresholds) {
484
484
  this.thresholds = { ...this.thresholds, ...newThresholds };
485
- console.log('[PerformanceMonitor] Updated thresholds:', this.thresholds);
485
+ // console.log('[PerformanceMonitor] Updated thresholds:', this.thresholds);
486
486
  }
487
487
 
488
488
  stopMonitoring() {
489
489
  if (!this.isMonitoring) {
490
- console.log('[PerformanceMonitor] Not currently monitoring');
490
+ // console.log('[PerformanceMonitor] Not currently monitoring');
491
491
  return;
492
492
  }
493
493
 
@@ -505,25 +505,25 @@ class PerformanceMonitor {
505
505
  }
506
506
  });
507
507
  this.webVitalsUnsubscribers = [];
508
- console.log('[PerformanceMonitor] Web Vitals observers cleaned up');
508
+ // console.log('[PerformanceMonitor] Web Vitals observers cleaned up');
509
509
  }
510
510
 
511
511
  // Cleanup PerformanceObserver fallback
512
512
  if (this.performanceObserver) {
513
513
  this.performanceObserver.disconnect();
514
514
  this.performanceObserver = null;
515
- console.log('[PerformanceMonitor] PerformanceObserver cleaned up');
515
+ // console.log('[PerformanceMonitor] PerformanceObserver cleaned up');
516
516
  }
517
517
 
518
518
  this.isMonitoring = false;
519
- console.log('[PerformanceMonitor] Stopped monitoring');
519
+ // console.log('[PerformanceMonitor] Stopped monitoring');
520
520
  }
521
521
 
522
522
  destroy() {
523
523
  this.stopMonitoring();
524
524
  this.callbacks = {};
525
525
  this.dataBuffer = null;
526
- console.log('[PerformanceMonitor] Destroyed');
526
+ // console.log('[PerformanceMonitor] Destroyed');
527
527
  }
528
528
  }
529
529
 
@@ -154,7 +154,14 @@
154
154
  </style>
155
155
  </head>
156
156
  <body>
157
- <div style="position: absolute; top: 5px; right: 5px; font-size: 10px; color: #999; font-family: monospace;">v2.1.2</div>
157
+ <div style="position: absolute; top: 5px; right: 35px; font-size: 10px; color: #999; font-family: monospace;">v2.1.2</div>
158
+
159
+ <!-- Settings Button (Top Right) -->
160
+ <button id="settings-btn" title="Settings" style="position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; padding: 0; border: none; background: transparent; cursor: pointer; opacity: 0.6; transition: opacity 0.2s;">
161
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" fill="#666">
162
+ <path d="M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"/>
163
+ </svg>
164
+ </button>
158
165
 
159
166
  <!-- Header with Title and Server Status -->
160
167
  <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid #e0e0e0;">