Hello @biznext
Thank you for the support topic, AMP does not allow custom javascript so the AMP plugin removes them to create Valid AMP pages.
AMP does allow custom javascript using amp-script component but it has Limited DOM support (Window.open() is not supported) as an amp-script run script in a Worker DOM.
We will recommend adding links with target attribute taget="_blank"
Hope this helps!
I know but sometimes I need a window open.
I saw a <amp-social-share> – I think it something maybe a solution.
it is not a simple link, but some button with open new window.
But I don’t know how to setup it.
Maybe you have an idea how to use this in more simple guide (even if there is a code customization) ?
Hello @biznext
The amp-social-share component can be used for social sharing, if you are looking to add social sharing button you can use plugins such as WordPress Share Buttons Plugin – AddThis
You can also use Jetpack plugin to add a social sharing button.
Can you please share your AMP page URL so we can check and understand your requirement and assist you with the proper solution?
@biznext
As we didn’t receive a response I’ll mark this as resolved. Feel free to open a new support topic if you require any further assistance.