I've been trying to get this to work but the new menuitem just will not show up no matter what I try. At this point I'm just trying to get the menuitem to show in the context (right click) menu. Please help!
install.rdf
<?xml version="1.0"?>
<RDF:RDF xmlns:em="http://www.mozilla.org/2004/em-rdf#"
xmlns:NC="http://home.netscape.com/NC-rdf#"
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<RDF:Description RDF:about="rdf:#$vR+Gs"
em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
em:minVersion="3.0a1"
em:maxVersion="3.7a1pre" />
<RDF:Description RDF:about="urn:mozilla:install-manifest"
em:id="stg@raphael"
em:name="stg"
em:version="1.0"
em:creator="x"
em:description="stg">
<em:targetApplication RDF:resource="rdf:#$vR+Gs"/>
</RDF:Description>
</RDF:RDF>
ff-overlay.xul
<?xml version="1.0" encoding="UTF-8"?>
<overlay id="stg-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml">
<script type="application/x-javascript" src="chrome://stg/chrome/content/ff-overlay.js" />
<popup id="contentAreaContextMenu">
<menuitem id="context-stg" label="Send To Gatherer" oncommand="stg.onMenuItemCommand(event)" />
</popup>
</overlay>
ff-overlay.js
var stg = {
alert('loaded')
onLoad: function() {
},
showContextMenu: function(event) {
document.getElementById("context-stg").hidden = false
},
onMenuItemCommand: function(e) {
alert('yay')
},
};
window.addEventListener("load", function(e){ stg.onLoad(e); }, false);
chrome.manifest
content stg chrome/content/
overlay chrome://browser/content/browser.xul chrome://stg/chrome/content/ff-overlay.xul
folder structure
stg@raphael
--[chrome]
----[content]
----ff-overlay.xul
----ff-overlay.js
install.rdf
chrome.manifest
I can install the extension, but no matter what I try the menuitem will not show up. PLEASE help. Thanks!
