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

77
Views
Firefox extension that gets selected password

I'm making a Firefox extension that gets the selected password hashes it and returns it Only thing that's bugging me is how to get the selected password

browser.contextMenus.create({
        id: "SecurePass",
        title: "SecurePass your Pass!",
        contexts: ["password"],
});

browser.contextMenus.onClicked.addListener(function(info, tab) {
        switch (info.menuItemId) {
          case "SecurePass": 
            const text = "This is password: " + info.value;
            console.log(text);
            break;
        }
})

Output of info:

Object { menuItemId: "SecurePass", parentMenuItemId: 10, viewType: "tab", frameId: 0, editable: true, targetElementId: 864623, pageUrl: "https://stackoverflow.com/users/login?ssrc=head&returnurl=https%3a%2f%2fstackoverflow.com%2f", modifiers: [], button: 0 }
​
button: 0
​
editable: true
​
frameId: 0
​
menuItemId: "SecurePass"
​
modifiers: Array []
​
pageUrl: "https://stackoverflow.com/users/login?ssrc=head&returnurl=https%3a%2f%2fstackoverflow.com%2f"
​
parentMenuItemId: 10
​
targetElementId: 864623
​
viewType: "tab"
about 4 years ago · Juan Pablo Isaza
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!