• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Evaluaciones
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

88
Vistas
Javascript Browser Snippet open multiple websites

I want to write a little helper with a Javascript Browser Snippet that opens multiple urls in my local environment. In Chrome, open DevTools => Sources => Snippets and create a new Snippet. Here I tried the following:

const skins = ["skin1", "skin2", "skin3"]
const openAllSkins = () => {
skins.map(skin => window.open(`http://${skin}.loc.mylocalenv.com:7000`, `_blank`)
}
openAllSkins()

When I run the snippet (right click the snippet => Run), it only opens the first skin. Why doesn't it work for all the other skins? When debugging, I can proof that the mapping runs through all skins, but somehow only the first one will be opened. 🤔

Any hints much appreciated.

Screenshot of how to write and run this snippet in Chrome DevTools

almost 3 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Allow pop-ups from your website for all the windows to open. This will work. Thanks.

enter image description here

almost 3 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda