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

156
Views
Firefox extension - retrieve href from class |works| - opening new window or start to download from given url - not working

I wrote an extension that should get the content of a specific href link. It should then open the url without user interaction.

The script I've been working on so far gets the correct url. It can print the url in a push notification. The basics of the FF extension work.

But no matter what I've tried (open.window, browser.downloads., window.location) never has a window opened or the download started when visting the domain / website containing the hidden--Element.

I'm a total beginner but I would like to get this script to work. This would motivate me to keep on learning.

This is from the manifest.json

"permissions": ["downloads.open", "downloads", "webRequest", "tabs"],
"content_scripts": [
{
    "matches": ["*://*.thedomain.org/*"],
    "js": ["border.js", "jquery-3.6.0.min.js", "adskip.js"],
"run_at": "document_end"

this is the content of adskip.js

for(var i=0; i<l.length; i++) {
  arringo.push(l[i].href);
}

alert(arringo);

function redirect() {
    location.href = arringo;
}
addEventListener('load', redirect);


I added the permissions in the manifest.json but I'm not sure whether I need them / another ones / or not at all.

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!