We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8eca29 commit 985b4b3Copy full SHA for 985b4b3
js/index.js
@@ -276,18 +276,17 @@ $(function() {
276
script.appendChild(iframe.createTextNode(scripts));
277
278
$('iframe').ready(function() {
279
+ var checkExists = setInterval(function() {
280
+ var body = iframe.getElementsByTagName('body')[0];
281
+ if (body) {
282
+ body.onclick = function() {
283
+ hideMenus();
284
+ };
285
+ body.appendChild(script);
286
+ clearInterval(checkExists);
287
+ }
288
+ }, 100);
289
- var body = iframe.getElementsByTagName('body')[0];
-
- body.onclick = function() {
- hideMenus();
- };
- if (body) {
- body.appendChild(script);
- } else {
- console.log("<body> element is missing!");
290
- }
291
});
292
293
};
0 commit comments