Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

94
Vistas
Firefox Extension | Set BadgeText to Browser.History GetVisits

I am trying to write a very simple extension for Firefox that shows an Icon Notifier in to Toolbar displaying the number of items I have visited the current website.

So far, I have set up a very simple manifest.json, which basically just creates the extension and an icon in the toolbar.

{

 "description": "Count the visits for the current website",
 "manifest_version": 2,
 "name": "CounttheVisits",
   "icons": {
   "48": "beasts-32.png"
 },
 "permissions": [
   "tabs"
 ],
 "version": "1.0",
 "browser_action": {
   "browser_style": true
 },
 "background": {
     "scripts": ["background.js"]
 }

}

Now I understand that I would have to add browserAction.setBadgeText() to the background.js and set it to take the value for number of visits from my browser history.

My best guess is something along the lines of:

var visits = browser.history.getVisits();
browser.browserAction.setBadgeText({text: (++visits).toString()});

But I am sure I am missing something - can anyone of you help? Much appreciated :)

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda