Skip to content

Commit 555866c

Browse files
committed
1.0.3
1 parent 4f625bf commit 555866c

8 files changed

Lines changed: 108 additions & 41 deletions

File tree

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ about: Create a report to help us improve
44
title: ''
55
labels: ''
66
assignees: ''
7-
87
---
98

109
**Describe the bug**
1110
A clear and concise description of what the bug is.
1211

1312
**To Reproduce**
1413
Steps to reproduce the behavior:
14+
1515
1. Go to '...'
1616
2. Click on '....'
1717
3. Scroll down to '....'
@@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
2424
If applicable, add screenshots to help explain your problem.
2525

2626
**Desktop (please complete the following information):**
27-
- OS: [e.g. iOS]
28-
- Browser [e.g. chrome, safari]
29-
- Version [e.g. 22]
27+
28+
- OS: [e.g. iOS]
29+
- Browser [e.g. chrome, safari]
30+
- Version [e.g. 22]
3031

3132
**Smartphone (please complete the following information):**
32-
- Device: [e.g. iPhone6]
33-
- OS: [e.g. iOS8.1]
34-
- Browser [e.g. stock browser, safari]
35-
- Version [e.g. 22]
33+
34+
- Device: [e.g. iPhone6]
35+
- OS: [e.g. iOS8.1]
36+
- Browser [e.g. stock browser, safari]
37+
- Version [e.g. 22]
3638

3739
**Additional context**
3840
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ about: Suggest an idea for this project
44
title: ''
55
labels: ''
66
assignees: ''
7-
87
---
98

109
**Is your feature request related to a problem? Please describe.**

README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# htmx-debugger v1.0.0 - 2024-09-30
1+
# htmx-debugger v1.0.3 - 2024-10-02
22

33
## Overview
44

5-
htmx-debugger is a powerful Chrome extension designed to help developers debug and analyze htmx applications. It provides a comprehensive and user-friendly interface for viewing htmx events, requests, and responses in real-time. This tool is essential for understanding and troubleshooting htmx-powered web applications, making the development process smoother and more efficient.
5+
htmx-debugger is a powerful browser extension (compatible with Chrome and Firefox) designed to help developers debug and analyze htmx applications. It provides a comprehensive and user-friendly interface for viewing htmx events, requests, and responses in real-time. This tool is essential for understanding and troubleshooting htmx-powered web applications, making the development process smoother and more efficient.
66

77
![htmx-debugger panel with events](htmx-panel-with-events.jpg)
88

@@ -26,20 +26,27 @@ htmx-debugger is a powerful Chrome extension designed to help developers debug a
2626

2727
## Installation
2828

29-
### Chrome Web Store (Recommended)
29+
### Chrome Web Store (Recommended - ONCE PUBLISHED, STILL TBD A/O 2024-10-02)
3030

31-
1. Visit the [htmx-debugger page](https://chrome.google.com/webstore/detail/htmx-debugger/[extension-id]) on the Chrome Web Store.
31+
1. Visit the [htmx-debugger page](https://chrome.google.com/webstore/detail/htmx-debugger/kjafpfamndifhkidbjebdnfjiebgdckf) on the Chrome Web Store.
3232
2. Click the "Add to Chrome" button.
3333
3. Confirm the installation when prompted.
3434

35-
### Manual Installation (For developers)
35+
### Manual Chrome Installation
3636

3737
1. Clone this repository or download the source code.
3838
2. Open Google Chrome and navigate to `chrome://extensions/`.
3939
3. Enable "Developer mode" by toggling the switch in the top right corner.
4040
4. Click on "Load unpacked" and select the directory containing the extension files.
4141
5. The htmx-debugger extension should now appear in your list of installed extensions.
4242

43+
### Manual Firefox Installation
44+
45+
1. Download the latest release file for Firefox browsers.
46+
2. Open Firefox and navigate to `about:debugging#/runtime/this-firefox`.
47+
3. Click on "Load Temporary Add-on..." and select the downloaded release file.
48+
4. The htmx-debugger extension should now appear in your list of installed extensions.
49+
4350
## Usage
4451

4552
### Opening the Debugger
@@ -124,6 +131,8 @@ By using htmx-debugger, users can be assured that their privacy is respected and
124131

125132
## Version History
126133

134+
- v1.0.3 (2024-10-02): Minor update and new Firefox release
135+
- Fixed sanitization issue recommended by Firefox
127136
- v1.0.0 (2024-09-30): Initial release
128137
- core features implemented
129138
- Chrome Web Store release

manifest-firefox.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"manifest_version": 2,
3+
"name": "htmx-debugger",
4+
"version": "1.0.3",
5+
"description": "htmx-debugger - a debugging tool for htmx applications",
6+
"permissions": ["tabs", "activeTab", "storage", "alarms", "<all_urls>"],
7+
"background": {
8+
"scripts": ["background.js"],
9+
"type": "module"
10+
},
11+
"content_scripts": [
12+
{
13+
"matches": ["<all_urls>"],
14+
"js": ["content.js"],
15+
"run_at": "document_idle"
16+
}
17+
],
18+
"browser_action": {
19+
"default_icon": {
20+
"16": "htmx-debugger-logo-16.png",
21+
"32": "htmx-debugger-logo-32.png",
22+
"48": "htmx-debugger-logo-48.png",
23+
"128": "htmx-debugger-logo-128.png"
24+
},
25+
"default_title": "htmx-debugger"
26+
},
27+
"devtools_page": "devtools.html",
28+
"web_accessible_resources": ["content.js"],
29+
"icons": {
30+
"16": "htmx-debugger-logo-16.png",
31+
"32": "htmx-debugger-logo-32.png",
32+
"48": "htmx-debugger-logo-48.png",
33+
"128": "htmx-debugger-logo-128.png"
34+
},
35+
"content_security_policy": "script-src 'self'; object-src 'self';",
36+
"browser_specific_settings": {
37+
"gecko": {
38+
"id": "htmx-debugger@beazley.org",
39+
"strict_min_version": "112.0"
40+
}
41+
}
42+
}

manifest.json

Lines changed: 2 additions & 2 deletions
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.0",
4+
"version": "1.0.3",
55
"description": "htmx-debugger - a debugging tool for htmx applications",
66
"permissions": ["activeTab", "scripting", "storage", "alarms"],
77
"host_permissions": ["https://*/", "http://*/"],
@@ -28,7 +28,7 @@
2828
"devtools_page": "devtools.html",
2929
"web_accessible_resources": [
3030
{
31-
"resources": ["content.js"],
31+
"resources": ["content.js", "panel.js"],
3232
"matches": ["<all_urls>"]
3333
}
3434
],

package-lock.json

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

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "htmx-debugger",
3-
"version": "1.0.0",
3+
"version": "1.0.3",
44
"description": "htmx-debugger - a debugging tool for htmx applications",
55
"author": "Phillip Beazley <phillip@beazley.org>",
66
"license": "MIT",
@@ -20,7 +20,7 @@
2020
"devDependencies": {
2121
"@eslint/js": "^9.11.1",
2222
"eslint": "^9.11.1",
23-
"globals": "^15.9.0",
23+
"globals": "^15.10.0",
2424
"prettier": "^3.3.3",
2525
"prettier-plugin-tailwindcss": "^0.6.8",
2626
"tailwindcss": "^3.4.13"

panel.js

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -105,31 +105,45 @@ function createEventElement(eventData) {
105105

106106
if (eventData.target) {
107107
const targetInfo = document.createElement('div');
108-
targetInfo.innerHTML = `
109-
<h5 class="font-bold mt-2">Target Element:</h5>
110-
<p>Tag: ${eventData.target.tagName || 'N/A'}</p>
111-
<p>ID: ${eventData.target.id || 'N/A'}</p>
112-
<p>Class: ${eventData.target.className || 'N/A'}</p>
113-
`;
114-
115-
// Explicitly handle HX attributes
108+
109+
const targetHeader = document.createElement('h5');
110+
targetHeader.className = 'font-bold mt-2';
111+
targetHeader.textContent = 'Target Element:';
112+
targetInfo.appendChild(targetHeader);
113+
114+
const tagP = document.createElement('p');
115+
tagP.textContent = `Tag: ${eventData.target.tagName || 'N/A'}`;
116+
targetInfo.appendChild(tagP);
117+
118+
const idP = document.createElement('p');
119+
idP.textContent = `ID: ${eventData.target.id || 'N/A'}`;
120+
targetInfo.appendChild(idP);
121+
122+
const classP = document.createElement('p');
123+
classP.textContent = `Class: ${eventData.target.className || 'N/A'}`;
124+
targetInfo.appendChild(classP);
125+
126+
// Handle HX Attributes
116127
if (eventData.target.hxAttributes && eventData.target.hxAttributes.length > 0) {
117-
const hxAttributesHeader = document.createElement('h5');
118-
hxAttributesHeader.textContent = 'HX Attributes:';
119-
hxAttributesHeader.className = 'font-bold mt-2 text-blue-600';
120-
targetInfo.appendChild(hxAttributesHeader);
128+
const hxHeader = document.createElement('h5');
129+
hxHeader.className = 'font-bold mt-2 text-blue-600';
130+
hxHeader.textContent = 'HX Attributes:';
131+
targetInfo.appendChild(hxHeader);
121132

122-
const hxAttributesList = document.createElement('ul');
123-
hxAttributesList.className = 'list-disc pl-5';
133+
const hxList = document.createElement('ul');
134+
hxList.className = 'list-disc pl-5';
124135
eventData.target.hxAttributes.forEach((attr) => {
125136
const li = document.createElement('li');
126137
li.textContent = `${attr.name}: ${attr.value}`;
127138
li.className = 'text-blue-600';
128-
hxAttributesList.appendChild(li);
139+
hxList.appendChild(li);
129140
});
130-
targetInfo.appendChild(hxAttributesList);
141+
targetInfo.appendChild(hxList);
131142
} else {
132-
targetInfo.innerHTML += '<p class="text-gray-500">No HX attributes found.</p>';
143+
const noHx = document.createElement('p');
144+
noHx.className = 'text-gray-500';
145+
noHx.textContent = 'No HX attributes found.';
146+
targetInfo.appendChild(noHx);
133147
}
134148

135149
eventContent.appendChild(targetInfo);

0 commit comments

Comments
 (0)