Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

129
Views
Move Firefox add-on icon to the open a new tab position

I created a Firefox add-on called New Tab Plus:

https://addons.mozilla.org/en-US/firefox/addon/newtabplus/

Currently the [+] icon is located at the very right portion of the tabstrip. I would like the [+] icon to be in the same position as the default Firefox "open a new tab" position, it's located next to the last tab. Is there any way do this?

manifest.json

{
    "manifest_version": 2,
    "name": "New Tab Plus",
    "version": "1.0",
    "description": "Adds a [+] icon which opens a new tab to a specified URL.",

    "icons": {
        "48": "page-48.svg"
    },

    "developer": {
        "name": "Andy Bajka"
    },  

    "background": {
        "scripts": ["background.js"]
    },

    "browser_action": {
        "default_icon": {
          "48": "page-48.svg"
        },
        "default_area": "tabstrip"
    },

    "permissions": [
        "storage",
        "tabs"
    ],

    "options_ui": {
        "page": "options.html"
    },

    "browser_specific_settings": {
        "gecko": {
            "id": "bcd339e2-fee5-40fd-8acd-2021a8815b95@bajka.com",
            "strict_min_version": "102.0"
        }
    }
}

background.js

function openPage() {
    browser.storage.local.get(['preferred_URL'], function(result) {
        console.log(result);
        browser.tabs.create({
            "url": result.preferred_URL
        })
    });
}

function onGot(item) {
    let preference_url = "https://www.google.com/";
    if (item.preference_url) {
        preference_url = item.preference_url;
    }
    browser.storage.local.set({ "preferred_URL" : preference_url });
}

function onError(error) {
    console.log(`Error: ${error}`);
}

browser.browserAction.onClicked.addListener(openPage);

console.log(browser.browserAction.onClicked.addListener);

let getting = browser.storage.sync.get("preference_url");
getting.then(onGot, onError);

How can I get the icon ID? Perhaps with the icon ID I could use CSS or other code to move it.

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!