【问题标题】:How to change default text in Firefox Scratchpad?如何更改 Firefox Scratchpad 中的默认文本?
【发布时间】:2015-06-09 00:31:37
【问题描述】:

新打开的 Firefox Scratchpad 包含以下文本:

/*
 * This is a JavaScript Scratchpad.
 *
 * Enter some JavaScript, then Right Click or choose from the Execute Menu:
 * 1. Run to evaluate the selected text (Ctrl+R),
 * 2. Inspect to bring up an Object Inspector on the result (Ctrl+I), or,
 * 3. Display to insert the result in a comment after the selection. (Ctrl+L)
 */

我想把它改成更有用的东西,比如

(function(){

})();

怎么做?

【问题讨论】:

    标签: firefox scratchpad


    【解决方案1】:

    假设我们有 Firefox v38,在 Windows 7 上运行,安装在文件夹 {path_to_ff} 中。

    文件{path_to_ff}/browser/omni.ja 包含许多定义FF 内部结构的有用内容。此文件是一个.jar 文件,因此您可以使用您喜欢的文件存档器轻松打开/提取它。

    暂存器的介绍文本只是捆绑包中的文本资源,位于omni.ja/chrome/{lang}/locale/browser/devtools/scratchpad.properties{lang} 是您的 FF 语言环境的语言代码,在我的例子中是“fr”)。此文本存储在scratchpadIntro1 键下:

    # LOCALIZATION NOTE  (scratchpadIntro): This is a multi-line comment explaining
    # how to use the Scratchpad. Note that this should be a valid JavaScript
    # comment inside /* and */.
    scratchpadIntro1=/* THE TEXT */
    

    更改文本时,请确保将其保留在一行中并更新omni.ja 文件。 FF 也应该重新启动,以使更改生效。

    【讨论】:

      猜你喜欢
      • 2013-07-16
      • 2015-11-28
      • 2013-01-02
      • 2013-06-08
      • 1970-01-01
      • 2011-06-30
      • 2017-10-23
      • 1970-01-01
      相关资源
      最近更新 更多