Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

190
Vistas
Greasemonkey - locate in iFrame, click on parent?

I need to do a click on a page only if certain text is found in an iFrame of that page. The iFrame is a different domain.

I have this script:

// ==UserScript==
// @name         Click
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Click Login
// @match        https://www.example.net/
// @match        https://www.example.net/index.php
// @match        https://www.google.com/recaptcha/*
// @require      http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @grant        none
// ==/UserScript==


var intv = setInterval(function() {

if (/(aria-checked="true")|(mediumheight)/i.test (document.body.innerHTML) ){

{

alert('Hello world!');

}

}

    }, 1000);

What this does is it finds aria-checked="true" and then displays the Hello World popup. But it all happens in the iFrame. And if I change the Hello World code to a code which does a click, the click will happen in the iFrame.

I would like aria-checked="true" to be located in the iFrame, but then the click to happen on the parent page (in this case, https://www.example.net)

Thanks

about 4 years ago · Juan Pablo Isaza
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 Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda