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

265
Views
Chrome extension API How to copy variable into clipboard?

I'm making a Chrome extension in V3. I try to get all Google cookies. It works fine and I can successfully write it to the console using console.log(). What I want to do is this: copy all the cookies that I got from chrome.cookies.getAll() into the user clipboard. How can I do this?

manifest.json:

{
  "name": "test",
  "manifest_version": 3,
  "version": "1",

  "background": {
    "service_worker": "background.js"
  },

  "host_permissions": [
    "*://*.google.com/*"
  ],

  "permissions": [
    "cookies"
  ]
}

background.js:

function test()
{
    chrome.cookies.getAll({
    }, function (theCookies) {
        cookies = theCookies
        console.log(cookies)
    });
}

test();
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!