let amp_frame = document.createElement('amp-iframe');
amp_frame.setAttribute('width','642');
amp_frame.setAttribute('height','590');
amp_frame.setAttribute('sandbox','allow-scripts allow-same-origin allow-popups');
amp_frame.setAttribute('frameborder','0');
amp_frame.setAttribute('layout','responsive');
amp_frame.setAttribute('allowfullscreen','');
amp_frame.setAttribute('resizable','');
amp_frame.setAttribute('heights','(max-width:430px) 90%, (max-width:505px) 85%, (max-width:564px) 80%, (max-width:664px) 77%, (max-width:750px) 75%, (max-width:845px) 72%, (max-width:998px) 70%, (max-width:1168px) 68%, (max-width:1324px) 66%, (max-width:1693px) 65%, 63%');
amp_frame.setAttribute('src','https://player.anyclip.com/anyclip-widget/lre-widget/qa/v1/src/amp-frame.html?pubname=amp&widgetname=test');
let amp_img = document.createElement('amp-img');
amp_img.setAttribute("layout","responsive");
amp_img.setAttribute("height","642");
amp_img.setAttribute("width","482");
amp_img.setAttribute("src","https://player.anyclip.com/anyclip-widget/lre-widget/assets/amp-pixel.png");
amp_img.setAttribute("placeholder",'');
amp_img.setAttribute("overflow",'');
amp_frame.appendChild(amp_img);
document.querySelectorAll('body > div.amp-wp-content > p:nth-child(8)')[0].appendChild(amp_frame);
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.