moz0601ex.txt

来自「mozilla developer book examples.」· 文本 代码 · 共 18 行

TXT
18
字号
var myFile = "xFly.jar";
initInstall(                      // initialize the installation
  "Install xFly",                 // display name of installation
  "xFly",                         // package name
  "0.0.1",                      // version of install
  1);                             // flags
f = getFolder("Chrome"); // specify a target directory
setPackageFolder(f);
addFile(myFile);         // add software to the installation
registerChrome(
  PACKAGE | DELAYED_CHROME,       // chrome switch (i.e., type)
  getFolder("Chrome","xFly.jar"), // destination of package
  "content/xFly/");               // location of manifest in package
if (0 == getLastError( ))   // if there have been no errors:
  performInstall( );        // install "xfly.jar"
else                       // otherwise
  cancelInstall( );         // cancel the installation.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?