pinokiod 3.201.0 → 3.202.0
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.
- package/package.json +1 -1
- package/server/public/nav.js +22 -0
package/package.json
CHANGED
package/server/public/nav.js
CHANGED
|
@@ -475,6 +475,28 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
|
475
475
|
const inspectorButton = document.querySelector('#inspector');
|
|
476
476
|
const isDesktop = agent === 'electron';
|
|
477
477
|
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
if (inspectorButton && isDesktop) {
|
|
481
|
+
inspectorButton.addEventListener('click', (event) => {
|
|
482
|
+
event.preventDefault();
|
|
483
|
+
event.stopPropagation();
|
|
484
|
+
|
|
485
|
+
try {
|
|
486
|
+
const frameElement = window.frameElement || null;
|
|
487
|
+
window.parent?.postMessage({
|
|
488
|
+
e: 'pinokio-start-inspector',
|
|
489
|
+
frameUrl: window.location.href,
|
|
490
|
+
frameName: window.name || null,
|
|
491
|
+
frameNodeId: frameElement?.dataset?.nodeId || null,
|
|
492
|
+
}, '*');
|
|
493
|
+
} catch (err) {
|
|
494
|
+
console.warn('[PinokioInspector] postMessage failed', err);
|
|
495
|
+
}
|
|
496
|
+
}, true);
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
|
|
478
500
|
if (inspectorButton && !isDesktop) {
|
|
479
501
|
const message = 'The 1-click inspect feature is only available inside the Pinokio desktop app.';
|
|
480
502
|
|