Frank Goossens on "[Plugin: Autoptimize] Non working embed code"

ساخت وبلاگ

Spectoos
Member
Posted 32 minutes ago #

Hi Frank,
I'd like to use this embed code on my site, but it breaks ...

<iframe id="intercom_map_iframe" src="" frameborder="0" height="600" width="800"></iframe><script>(function(){var d = document.getElementById('intercom_map_iframe').contentWindow.document;d.open().write('<body onload="document.location.replace('https://share.intercom.io/mnXeOFKMi-lg?embed=true')"></body>');d.close();})();</script>

Please check http://www.spectoos.com/map

Any ideas?

Thank you,
Guy.

https://wordpress.org/plugins/autoptimize/

you could wrap that entire block in noptimize-tags (see FAQ) or add intercom_map_iframe to the comma-separated JS optimization exclusion list?

frank

Spectoos
Member
Posted 11 minutes ago #

Thanks Frank,
I've added intercom_map_iframe, to the comma-separated list but it still doesn't work ...

Cheers,
Guy.

well, then you could go for the noptimize-approach? :)

Spectoos
Member
Posted 1 minute ago #

OK, <!-- noptimize --> solved it!

Cheers,
Guy.

I see

11:57:30.484 SyntaxError: unterminated string literal1map:65:105

on my browser's console, so that confirms the JS has been excluded from optimization, but there seems to be a problem with it?

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 344 تاريخ : چهارشنبه 13 مرداد 1395 ساعت: 17:13