Here my code:
script...
Code: Select all
/**
* flyBarsEnhancedChrome namespace.
*/
if ("undefined" == typeof(flyBarsEnhancedChrome)) {
var flyBarsEnhancedChrome = {};
};
/**
* Controls the browser overlay for the Hello World extension.
*/
flyBarsEnhancedChrome.flyBarsEnhanced = {
/**
* Says 'Hello' to the user.
*/
sayHello : function() {
// let stringBundle = document.getElementById("flyBarsEnhanced-string-bundle");
// let message = stringBundle.getString("flyBarsEnhanced.greeting.label");
window.open("chrome://navigator/content/flyBarsEnhanced.xul", "chrome,width=600,height=300");
}
};
try{
flyBarsEnhanced.sayHello();
}catch(e){};
xul
Code: Select all
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="chrome://global/skin/" ?>
<?xml-stylesheet type="text/css" href="chrome://flyBarsEnhanced/skin/flyBarsEnhanced.css" ?>
<!DOCTYPE overlay SYSTEM "chrome://flyBarsEnhanced/locale/flyBarsEnhanced.dtd">
<window
id="flyBarsEnhanced-window"
title="&flyBarsEnhanced.title;"
orient="horizontal"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<!-- Other elements go here -->
<button id="find-button" label="Find"/>
<button id="cancel-button" label="Cancel"/>
</window>