embed_embedly_integration.html 846 B

12345678910111213141516171819202122232425
  1. <script>
  2. (function(w, d){
  3. var id='embedly-platform', n = 'script';
  4. if (!d.getElementById(id)){
  5. w.embedly = w.embedly || function() {(w.embedly.q = w.embedly.q || []).push(arguments);};
  6. var e = d.createElement(n); e.id = id; e.async=1;
  7. e.src = ('https:' === document.location.protocol ? 'https' : 'http') + '://cdn.embedly.com/widgets/platform.js';
  8. var s = d.getElementsByTagName(n)[0];
  9. s.parentNode.insertBefore(e, s);
  10. }
  11. })(window, document);
  12. <bx_if:key>
  13. $(document).ready(function () {
  14. embedly("defaults", {
  15. cards: {key: '__key__'},
  16. controls: 0
  17. });
  18. embedly('on', 'card.resize', function(iframe){
  19. var $card = $(iframe);
  20. var $card_parent = $card.parents('.fr-embedly');
  21. $card_parent.css('height', $card.height());
  22. });
  23. });
  24. </bx_if:key>
  25. </script>