Receiving the message in c# Firefox Extension via mail native

I try to get active tab title as well as the URL of Mozilla Firefox. I started to set up a Firefox Add and installed using registry entry. My own developed Firefox Add on is installed perfectly and it is to display the current time of the machine. This Firefox Add on the file chrome.manifest install.rdf, sample.xul, overlay.xul, clock.xul, clock.js etc. Here is my code.

chrome.manifest-
content HelloWorld jar:chrome/helloworld.jar!/content/
overlay chrome://browser/content/browser.xul chrome://helloworld/content/overlay.xul
settings regional helloworld en jar:chrome/helloworld.jar!/locale/en-US/
settings regional helloworld en - US jar:chrome/helloworld.jar!/locale/fr-FR/
skin helloworld classic/1.0 jar:chrome/helloworld.jar!/skin/classic/
style chrome://browser/content/browser.xul chrome://helloworld/skin/overlay.css
style chrome://global/content/customizeToolbar.xul chrome://helloworld/skin/overlay.css

Clock.XUL-

"" < dialog id = "clockDialog" xmlns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"

   title="&helloworld.clock;" buttons="accept"
   onload="initClock();">
 <script type="application/javascript" src="chrome://helloworld/content/clock.js" />
 <hbox align="center">
   <label value="&helloworld.currentTime;:" />
   <textbox id="currentTime" />
 </hbox>

< / dialogue >

Clock.js-
function initClock() {}

 showCurrentTime();
 window.setInterval(showCurrentTime, 1000);

}

function showCurrentTime() {}

 var textbox = document.getElementById("currentTime");
 textbox.value = new Date().toLocaleTimeString();
 textbox.select();

}

I want to convert this code to fetch the current tab title and the URL of the browser Firefox. Initially, I concentrate on the part browser extension and not the native for now and I just want to have a listener in the files js such as whenever I switch to a firefox different tab or window of firefox, an alert should be displayed in the browser itself (no tongue at this time) showing the title and the URL of the active tab.

I want to get the solutions he code. It would be helpful if someone can help me to get the exact solutions.

Hello chiranjib.baner, sorry support.mozilla.org is a user facing support site where we probably aren't able to help you with the development of related issues. Please try it in a forum like https://forums.mozilla.org/addons/index.php instead.
Thank you for your understanding!

Tags: Firefox

Similar Questions

Maybe you are looking for