let amp_frame = document.createElement('amp-iframe');
amp_frame.setAttribute('width','0');
amp_frame.setAttribute('height','0');
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:276px) 67.7%, (max-width:332px) 66.1%, (max-width:432px) 64%, (max-width:532px) 62.5%, (max-width:632px) 61.6%, 61.6%');
amp_frame.setAttribute('src','https://player.anyclip.com/anyclip-widget/lre-widget/qa/v1/src/amp-frame.html?pubname=amp&widgetname=test&bbgc=FFF');
let amp_img = document.createElement('amp-img');
amp_img.setAttribute("layout","responsive");
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.