I'm creating a simple user script and I want to select an element that is inside of an iframe document.
The element that I want to select is an <embed> that is in an iframe document hosted in other domain, I set the @include for both domains: // @include https://*.facebook.com/deadtrigger_ii/// @include https://integrated-plugin-canvas-*-*.fbsbx.com/apps/*/?params=* My script lines: var iframe = document.getElementById('iframe_canvas');var otherdocument = iframe.contentDocument || iframe.contentWindow.document;var unity = otherdocument.querySelector("embed[type='application/vnd.unity']"); otherdocument.style.setProperty("margin", "0px", "important"); Is there some problem? What do I need to do to get that <embed>? I'm very amateur in JavaScript, I need help. Thanks. -- You received this message because you are subscribed to the Google Groups "greasemonkey-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/greasemonkey-users. For more options, visit https://groups.google.com/d/optout.
