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

154
Views
Force Chrome to always load tabs

For some reason, Chrome doesn't load background tabs until Activated, selected, or both. I am writing a script with Manifest v3 to allow tabs to load when opened in the background that will Activate them and return to the original tab so they load. Currently, it is not working. Are there better workarounds than having a background process always running and sending a message to activate these tabs and return to current tab?

chrome.tabs.onCreated.addListener(newTab => newTabCreated(newTab));

async function newTabCreated(newTab) {
  try {
    const currentTab = await getCurrentTab();

    await chrome.tabs.update(newTab.id, { active: true });
    await chrome.tabs.update(currentTab.id, { active: true });

    const loadedStatus = await chrome.tabs.query({status: "complete"});

    loadedStatus.forEach(element => {
      JSON.stringify(console.log(element));
    });

    console.log(`
      current tab id: ` + JSON.stringify(currentTab.id) + `
      new tab id: `+ JSON.stringify(newTab.id));

  } catch (error) {
    console.log("Error: " + error);
  }
}

async function getCurrentTab() {
  let queryOptions = { active: true, currentWindow: true };
  const [tab] = await chrome.tabs.query(queryOptions);
  return 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!