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

299
Views
Imacros for Firefox - Is it possible to use match in javascript but read from a datasource instead of declaring directly in the macro?
SET !VAR2 EVAL("var s=\"{{!EXTRACT}}\"; if(s.match(\"One|Two|Three|Four|Five\")){url=\"imacros://run/?m=#Found.iim\";} else url=\"imacros://run/?m=#Continue.iim\"; url;")

I have a fair bit of knowledge in imacros but am still learning JS. I have been using the above JS code on one line within a macro for match conditions. Can anyone tell me if its possible to use a datasource to hold all possible values for the match query? Rather than piping the possibilities...? The datasource would be a .txt file and would have hundreds if not thousands that it would need to check the extract against for a match

I also need to figure out how to ignore case on the datasource match and to make sure the match is the exact word only.

Thanks in advance

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!