简体   繁体   English

在Firefox 50中,用于覆盖和扩展DevTools主窗口的适当chrome:// URL是什么?

[英]In Firefox 50, what is the appropriate chrome:// URL to overlay and extend DevTools main window?

Previously, you could extend/style Firefox DevTools at chrome://devtools/content/framework/toolbox-options.xul with an overlay. 以前,您可以在chrome://devtools/content/framework/toolbox-options.xul上使用叠加层扩展/样式化Firefox DevTools。

Now, that seems to no longer exist in Firefox 50. The Developer toolbox shows about:devtools-toolbox as the URL. 现在,在Firefox 50中似乎不再存在。开发者工具箱将about:devtools-toolbox为URL。 I'm not sure what the XUL URL of that is. 我不确定那是什么XUL URL。 What is an appropriate chrome:// URL to extend or restyle the Firefox DevTools? 什么是适当的chrome:// URL来扩展重新设计 Firefox DevTools?

The DevTools options moved to chrome://devtools/content/framework/toolbox-options.xhtml in Firefox 48. However, there are many files involved in making up the DevTools. 在Firefox 48中,DevTools选项已移至chrome://devtools/content/framework/toolbox-options.xhtml 。但是,构成DevTools涉及许多文件。 Without detailed information as to what you are wanting to do, it is impossible to say that is the only file you will need to overlay or override . 没有关于您想要做什么的详细信息,就不可能说这是您唯一需要覆盖覆盖的文件 If you are looking for the overall container of for the DevTools toolbox container, it is chrome://devtools/content/framework/toolbox.xul . 如果您正在寻找DevTools工具箱容器的整体容器,则为chrome://devtools/content/framework/toolbox.xul

As is normally the case for determining things like this, you can use the add-on DOM Inspector . 与确定此类情况通常一样,您可以使用附加的 DOM Inspector I also install the Element Inspector extension, which enables you to open the DOM Inspector on any element with a Shift + right-click. 我还安装了Element Inspector扩展,它使您可以通过Shift +右键单击在任何元素上打开DOM Inspector。 You can also open the DOM Inspector from the Menu Bar->Tools->Web Developer->DOM Inspector. 您也可以从菜单栏->工具-> Web开发人员-> DOM检查器中打开DOM检查器。

Having both of those add-ons installed makes it easy to find out what the URL is for the DevTools options: just open the DevTools, F12 ; 安装了这两个附加组件后,可以轻松找到DevTools选项的URL:只需打开DevTools F12 display the options; 显示选项; then open Dom Inspector by Shift + right-click within the DevTools options; 然后通过Shift +在DevTools选项中右键单击打开Dom Inspector; then within the DOM Inspector select the topmost <document> and switch to the JavaScript Object view. 然后在DOM Inspector中选择最上面的<document>并切换到JavaScript Object视图。 The URL property will display the URL. URL属性将显示URL。

显示网址

I also find it convenient to unpack the omni.ja files that come with Firefox. 我还发现解压缩Firefox 随附的omni.ja文件非常方便。 These are located in [Firefox install directory] and [Firefox install directory]/browser/ . 它们位于[Firefox安装目录][Firefox安装目录] / browser /中 Prior to Firefox 48, there was also one in [Firefox install directory]/webapprt . 在Firefox 48之前, [Firefox安装目录] / webapprt中也存在一个。 I find that having these unpacked makes it easier to go exploring through the files and makes them easily available to grab a copy when needed for an override . 我发现将这些文件解压缩后,可以更轻松地浏览文件,并可以在需要覆盖时轻松地获取它们。 Alternately, you can go looking through the source code . 或者,您可以浏览源代码 For the DevTools, they are in the browser/omni.ja file within the chrome/devtools directory. 对于DevTools,它们位于chrome / devtools目录中的browser / omni.ja文件中。

Official APIs 官方API

The DevTools API : DevTools API
The DevTools API is considered a work in progress. DevTools API被视为正在进行中的工作。 With this API it is possible to add tabs/tools to the DevTools panel, registerTool(toolDefinition) , register a theme, registerTheme(themeDefinition) , etc. 使用此API可以将选项卡/工具添加到DevTools面板, registerTool(toolDefinition) ,注册主题, registerTheme(themeDefinition)等。

The Add-on SDK dev/panel API allows you to add a panel to the DevTools toolbox . 附加SDK dev/panel API允许您将面板添加到DevTools 工具箱

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM