Om de ûnderfining foar jo te ferbetterjen is tydlik de funksjonaliteit dan dizze website troch ûnderhâldswurk beheind. Wannear in artikel jo probleem net oplost en jo in fraach stelle wolle, kin ús stipemienskip jo helpe yn @FirefoxSupport op Twitter en /r/firefox op Reddit.

Sykje yn Support

Mij stipescams. Wy sille jo nea freegje in telefoannûmer te beljen, der in sms nei ta te stjoeren of persoanlike gegevens te dielen. Meld fertochte aktiviteit mei de opsje ‘Misbrûk melde’.

Mear ynfo

Dizze konversaasje is argivearre. Stel in nije fraach as jo help nedich hawwe.

Receiving message in C# from Firefox Extension through Native Messaging

more options

I am trying to get active Tab Title as well as URL from Mozilla Firefox. I have started to build up a Firefox add on and installed it using registry entry. My own developed Firefox add on is installed perfectly and it is showing the current machine time. This Firefox add on contains file like chrome.manifest, install.rdf, sample.xul, overlay.xul, clock.xul, clock.js etc. Below is my code.

chrome.manifest ---- content helloworld jar:chrome/helloworld.jar!/content/ overlay chrome://browser/content/browser.xul chrome://helloworld/content/overlay.xul locale helloworld en-US jar:chrome/helloworld.jar!/locale/en-US/ locale helloworld fr-FR 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>

</dialog>

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 current tab title and URL from Firefox browser. At first, I am concentrating on the browser extension part and not the native for now and I just want to have a listener inside the js files such that whenever I switch to a different firefox tab or firefox window, an alert should show up from the browser itself (not from native at this moment) displaying the active tab's title and URL.

I want to get the solutions it code . It would be great help if any one can help me to get the exact solutions.

I am trying to get active Tab Title as well as URL from Mozilla Firefox. I have started to build up a Firefox add on and installed it using registry entry. My own developed Firefox add on is installed perfectly and it is showing the current machine time. This Firefox add on contains file like chrome.manifest, install.rdf, sample.xul, overlay.xul, clock.xul, clock.js etc. Below is my code. chrome.manifest ---- content helloworld jar:chrome/helloworld.jar!/content/ overlay chrome://browser/content/browser.xul chrome://helloworld/content/overlay.xul locale helloworld en-US jar:chrome/helloworld.jar!/locale/en-US/ locale helloworld fr-FR 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---- <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/"?> <!DOCTYPE dialog SYSTEM "chrome://helloworld/locale/clock.dtd"> <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> </dialog> 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 current tab title and URL from Firefox browser. At first, I am concentrating on the browser extension part and not the native for now and I just want to have a listener inside the js files such that whenever I switch to a different firefox tab or firefox window, an alert should show up from the browser itself (not from native at this moment) displaying the active tab's title and URL. I want to get the solutions it code . It would be great help if any one can help me to get the exact solutions.

Bewurke troch chiranjib.baner op

Keazen oplossing

hello chiranjib.baner, sorry support.mozilla.org is a user facing support site where we probably aren't able to help you with development related questions. please try it in a specialised forum like https://forums.mozilla.org/addons/index.php instead. thank you for your understanding!

Dit antwurd yn kontekst lêze 👍 1

Alle antwurden (2)

more options

Keazen oplossing

hello chiranjib.baner, sorry support.mozilla.org is a user facing support site where we probably aren't able to help you with development related questions. please try it in a specialised forum like https://forums.mozilla.org/addons/index.php instead. thank you for your understanding!

more options

Thanks for your prompt reply @philipp. I will definitely follow your suggestion and upload my question at Mozilla forum.

Bewurke troch chiranjib.baner op