Skip to content

Commit 1513aa7

Browse files
committed
Release 1.0.1
1 parent ff6e93a commit 1513aa7

File tree

9 files changed

+13
-42
lines changed

9 files changed

+13
-42
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,4 +209,4 @@ MIT License - See [LICENSE](LICENSE.md) file for details
209209
## Support
210210

211211
- **Issues**: Report bugs on GitHub
212-
- **Plugin Documentation**: See main [README](../README.md)
212+
- **Plugin Documentation**: See main [README](https://github.com/sidworks-dev/sw-plugin-devtools/blob/main/README.md)

js/background.js

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,34 @@
1-
/**
2-
* Sidworks DevTools for Shopware 6
3-
* Background Service Worker - Manages communication between content and devtools
4-
*/
5-
61
const ports = new Map();
72

83
// Handle connections from content scripts and devtools
94
chrome.runtime.onConnect.addListener((port) => {
105
let portName = port.name;
116
let tabId = 0;
12-
7+
138
// Get tab ID from sender
149
if (port.sender?.tab?.id) {
1510
tabId = port.sender.tab.id;
1611
}
17-
12+
1813
// Create unique port identifier
1914
const portKey = `${portName}:${tabId}`;
2015
console.log('Connected:', portKey);
21-
16+
2217
ports.set(portKey, port);
23-
18+
2419
// Handle messages
2520
port.onMessage.addListener((msg) => {
2621
// Add tab ID if not present
2722
if (!msg.tabId && port.sender?.tab?.id) {
2823
msg.tabId = port.sender.tab.id;
2924
}
30-
25+
3126
if (!msg.tabId) {
3227
msg.tabId = 0;
3328
}
34-
29+
3530
console.log(`Message for ${msg.to}(${msg.tabId}): ${msg.type}`);
36-
31+
3732
// Handle background-specific messages
3833
if (msg.to === 'background') {
3934
if (msg.type === 'icon') {
@@ -46,7 +41,7 @@ chrome.runtime.onConnect.addListener((port) => {
4641
forwardMessage(msg);
4742
}
4843
});
49-
44+
5045
// Cleanup on disconnect
5146
port.onDisconnect.addListener(() => {
5247
// Check and suppress BFCache-related errors
@@ -64,7 +59,7 @@ chrome.runtime.onConnect.addListener((port) => {
6459
function forwardMessage(msg) {
6560
const targetPort = `${msg.to}:${msg.tabId}`;
6661
const port = ports.get(targetPort);
67-
62+
6863
if (port) {
6964
try {
7065
port.postMessage(msg);

js/content.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
/**
2-
* Sidworks DevTools for Shopware 6
3-
* Content Script - ULTRA SIMPLE VERSION
4-
*/
5-
61
let port = null;
72
let hasProcessed = false; // Flag to prevent reprocessing
83

js/devtools-init.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
/**
2-
* Sidworks DevTools for Shopware 6
3-
* DevTools Initialization
4-
*/
5-
61
if (typeof chrome !== 'undefined' && chrome.devtools) {
72
// Check if Shopware DevTools data exists on the page
83
chrome.devtools.inspectedWindow.eval(
@@ -11,7 +6,7 @@ if (typeof chrome !== 'undefined' && chrome.devtools) {
116
if (isException || !hasDevToolsData) {
127
return;
138
}
14-
9+
1510
// Create sidebar pane in Elements panel
1611
try {
1712
chrome.devtools.panels.elements.createSidebarPane(

js/inspector.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
/**
2-
* Sidworks DevTools for Shopware 6
3-
* Inspector (Sidebar) Script - Simplified
4-
*/
5-
61
function onItemInspected() {
72
function getElementData(el) {
83
if (!el) {

js/options.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/**
2-
* Sidworks DevTools - Options Page
3-
*/
4-
51
// Load saved settings
62
function loadSettings() {
73
chrome.storage.sync.get({

js/popup.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
/**
2-
* Sidworks DevTools for Shopware 6
3-
* Popup Script
4-
*/
5-
61
// Get extension version
72
const manifest = chrome.runtime.getManifest();
83
document.getElementById('versionInfo').textContent = `Version ${manifest.version}`;

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 3,
33
"name": "Sidworks DevTools for Shopware 6",
44
"description": "Developer tools for Shopware 6 - Inspect templates and debug your storefront",
5-
"version": "1.0.0",
5+
"version": "1.0.1",
66
"icons": {
77
"128": "images/icon128.png"
88
},

popup.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
<div class="links">
4242
<a href="https://github.com/sidworks-dev" class="link-btn" target="_blank">GitHub</a>
43-
<a href="https://github.com/sidworks-dev/sw-plugin-dev-tools/wiki" class="link-btn secondary" target="_blank">Documentation</a>
43+
<a href="https://github.com/sidworks-dev/sw-plugin-devtools/?tab=readme-ov-file#sidworks-devtools-for-shopware-6" class="link-btn secondary" target="_blank">Documentation</a>
4444
</div>
4545
</div>
4646

0 commit comments

Comments
 (0)