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

189
Views
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
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!