0

i create a frame like this:

var f = document.createElement('iframe');
f.src = 'https://apis.google.com/u/0/wm/4/_/widget/render/comments?usegapi=1&first_party_property=YOUTUBE&href=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D' + location.href.match(/v=(.+?)([#&]|$)/)[1];

but I would want the frame to have the same height the source has, so all is visible, instead of setting a static height and getting scrollbars. maybe I did it wrong, but overflow = visible didn't seem to work.

Ahmed Salman Tahir
  • 1,751
  • 1
  • 17
  • 26
  • Might want to check out this http://www.dyn-web.com/tutorials/iframes/height/ – Robin-Hoodie Mar 22 '15 at 13:24
  • or may have a look to similar questions http://stackoverflow.com/questions/153152/resizing-an-iframe-based-on-content – ddlab Mar 22 '15 at 13:31
  • im not sure those would work. i need the frame to resize itself every time, not just on "onload". i cant create helper sites, and its not on the same domain. i basically just need to do the same youtube does with the comment frame. it resizes every time more comments are loaded. how did they do it? – Kovács János Mar 23 '15 at 15:53

0 Answers0