Skip to content

Commit f73c96d

Browse files
committed
1.0.5 - before/after + less console output
1 parent 32c4554 commit f73c96d

9 files changed

Lines changed: 34 additions & 32 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ dist/
33
releases/
44
.vscode/
55
.build.ps1
6+
package-lock.json

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
**/releases
44
**/.vscode
55
.build.ps1
6+
package-lock.json

content.js

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
document.body.addEventListener(event, this.logEvent.bind(this));
4444
});
4545

46-
console.log('htmx event listeners set up');
46+
// console.log('htmx event listeners set up');
4747
} catch (error) {
4848
console.error('Error during htmx-debugger initialization:', error);
4949
this.handleError(error);
@@ -53,7 +53,7 @@
5353
},
5454

5555
isExtensionEnvironment: function () {
56-
console.log('Checking extension environment...');
56+
// console.log('Checking extension environment...');
5757
if (typeof chrome === 'undefined') {
5858
console.warn('Chrome API is not available');
5959
return false;
@@ -64,7 +64,7 @@
6464
}
6565
try {
6666
chrome.runtime.getURL('');
67-
console.log('chrome.runtime.id exists:', !!chrome.runtime.id);
67+
// console.log('chrome.runtime.id exists:', !!chrome.runtime.id);
6868
return true;
6969
} catch (error) {
7070
console.warn('Extension context is invalid:', error.message);
@@ -148,7 +148,7 @@
148148
eventInfo.xhr = this.getXhrInfo(event.detail.xhr);
149149
}
150150

151-
console.log('htmx Event:', eventInfo);
151+
// console.log('htmx Event:', eventInfo);
152152
this.sendMessage(eventInfo);
153153
} catch (error) {
154154
console.error('Error logging event:', error);
@@ -164,7 +164,7 @@
164164
}
165165

166166
try {
167-
console.log('Sending htmx debug info:', JSON.stringify(data, null, 2));
167+
// console.log('Sending htmx debug info:', JSON.stringify(data, null, 2));
168168
chrome.runtime.sendMessage(
169169
{
170170
type: 'HTMX_EVENT',
@@ -177,7 +177,7 @@
177177
this.isConnected = false;
178178
this.attemptReconnection();
179179
} else {
180-
console.log('Message sent successfully:', response);
180+
// console.log('Message sent successfully:', response);
181181
this.reconnectAttempts = 0; // Reset reconnect attempts on successful message
182182
}
183183
}
@@ -310,7 +310,7 @@
310310
console.warn('Connection check failed, retrying...', chrome.runtime.lastError);
311311
setTimeout(checkConnection, 1000);
312312
} else {
313-
console.log('Connection verified:', response);
313+
// console.log('Connection verified:', response);
314314
this.isConnected = true;
315315
this.reconnectAttempts = 0;
316316
resolve();
@@ -333,13 +333,13 @@
333333

334334
startConnectionCheck: function () {
335335
const periodicCheck = () => {
336-
console.log('Running periodic check...');
336+
// console.log('Running periodic check...');
337337
try {
338338
if (this.isExtensionEnvironment()) {
339-
console.log('Extension environment valid, verifying connection...');
339+
// console.log('Extension environment valid, verifying connection...');
340340
this.verifyConnection()
341341
.then(() => {
342-
console.log('Periodic connection check successful');
342+
// console.log('Periodic connection check successful');
343343
})
344344
.catch((error) => {
345345
console.error('Periodic connection check failed:', error);
@@ -353,7 +353,7 @@
353353
console.error('Error during periodic check:', error);
354354
this.handleExtensionInvalidated();
355355
} finally {
356-
console.log('Scheduling next check...');
356+
// console.log('Scheduling next check...');
357357
setTimeout(periodicCheck, 5000);
358358
}
359359
};
@@ -405,7 +405,7 @@
405405

406406
// Move the captureHtmxEvent and related functions inside the IIFE
407407
function captureHtmxEvent(event) {
408-
console.log('htmx event captured:', event.type, event);
408+
// console.log('htmx event captured:', event.type, event);
409409

410410
// Skip connection tests and other non-essential events
411411
if (event.type === 'TEST' || event.type === 'CONNECTION_TEST' || event.detail?.type === 'CONNECTION_TEST') {
@@ -544,7 +544,7 @@
544544
if (chrome.runtime.lastError) {
545545
console.error('Error sending message:', chrome.runtime.lastError);
546546
} else {
547-
console.log('Message sent successfully:', response);
547+
// console.log('Message sent successfully:', response);
548548
}
549549
}
550550
);
@@ -623,5 +623,3 @@
623623
console.warn('Not running in a Chrome extension environment. htmx event capture disabled.');
624624
}
625625
})();
626-
627-
console.log('htmx-debugger content script loaded');

manifest-firefox.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 2,
33
"name": "htmx-debugger",
4-
"version": "1.0.4",
4+
"version": "1.0.5",
55
"description": "htmx-debugger - a debugging tool for htmx applications",
66
"permissions": ["activeTab", "alarms"],
77
"background": {

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 3,
33
"name": "htmx-debugger",
4-
"version": "1.0.4",
4+
"version": "1.0.5",
55
"description": "htmx-debugger - a debugging tool for htmx applications",
66
"permissions": ["alarms"],
77
"optional_host_permissions": ["<all_urls>"],

output.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,9 @@ video {
455455
.mr-2 {
456456
margin-right: 0.5rem;
457457
}
458+
.mt-1 {
459+
margin-top: 0.25rem;
460+
}
458461
.mt-2 {
459462
margin-top: 0.5rem;
460463
}

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "htmx-debugger",
3-
"version": "1.0.4",
3+
"version": "1.0.5",
44
"description": "htmx-debugger - a debugging tool for htmx applications",
55
"author": "Phillip Beazley <phillip@beazley.org>",
66
"license": "MIT",
@@ -14,19 +14,18 @@
1414
"css": "tailwindcss -c ./tailwind.config.mjs -i ./tailwind.css -o ./output.css --minify",
1515
"format": "prettier --write .",
1616
"lint": "eslint .",
17-
"build": "powershell ./.build.ps1",
18-
"prepare": "npm run build"
17+
"build": "pwsh -NoLogo -NoProfile -ExecutionPolicy Bypass \"./.build.ps1\""
1918
},
2019
"devDependencies": {
2120
"@eslint/js": "^9.12.0",
2221
"eslint": "^9.12.0",
23-
"globals": "^15.10.0",
22+
"globals": "^15.11.0",
2423
"prettier": "^3.3.3",
2524
"prettier-plugin-tailwindcss": "^0.6.8",
2625
"tailwindcss": "^3.4.13"
2726
},
2827
"peerDependencies": {
29-
"htmx.org": "^2.0.2"
28+
"htmx.org": "^2.0.3"
3029
},
3130
"repository": {
3231
"type": "git",

panel.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,10 +417,10 @@ function captureElementSnapshot(element) {
417417
return {
418418
outerHTML: element.outerHTML,
419419
innerHTML: element.innerHTML,
420-
attributes: Array.from(element.attributes).map(attr => ({
420+
attributes: Array.from(element.attributes).map((attr) => ({
421421
name: attr.name,
422-
value: attr.value
423-
}))
422+
value: attr.value,
423+
})),
424424
};
425425
}
426426

0 commit comments

Comments
 (0)