Files
2019-09-21 00:06:42 +02:00

12 lines
398 B
JavaScript
Executable File

/**
This script is run whenever the devtools are open.
In here, we can create our sidebar, and when the selected node in the inspector
change, we evaluate it and display its properties in the sidebar.
*/
browser.devtools.panels.elements.createSidebarPane("DOM").then(sidebar => {
browser.devtools.panels.elements.onSelectionChanged.addListener(() => {
sidebar.setExpression(`$0`);
});
});