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

169
Views
How to copy clipboard value into javascript variable?

I am checking possibilities of nut.js and I've encountered an issue. Program is able to copy value off website/document and I would like to keep copied value in js variable for comparison. Is that possible with nut.js or do I need some different tool to achieve that?

var paste = async() => {
let time = navigator.clipboard.writeText()
console.log(time) 
}

Above code throws an error: "(node:13432) UnhandledPromiseRejectionWarning: ReferenceError: navigator is not defined"

That's probably because navigator works in browser only. I need to access current clipboard value from my PC.

Thanks

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I managed to solve this using nut.js

var clipboardData = async() => {
let data = await clipboard.paste()
console.log(data)
}

Issue can be closed

about 4 years ago · Juan Pablo Isaza Report
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!