/
githubmirror
/
amphtml
Обзор
Документация
Войти
/
githubmirror
/
amphtml
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
3p/remote.html
28 строк
980 B
Shihua Zheng
Fix the URL in remote.html example (#35369)
23 июл 2021, 23:10
Не верифицирован
23 июл 2021, 23:10
84f5925
Код
Авторство
О чём код?
<!doctype html> <head> <meta charset="utf-8"> <meta name="robots" content="noindex"> <script> (function() { var v = location.search.substr(1); if (!(/^\d+(-canary)?$/.test(v))) return; var u = 'https://3p.ampproject.net/'+encodeURIComponent(v)+'/vendor/_ping_.js'; // Replace _ping_ with the vendor you wish to use document.write('<script'+' src="'+encodeURI(u)+'"><'+'/script>'); // lgtm [js/eval-like-call] })(); </script> </head> <body style="margin:0"> <div id="c" style="position:absolute;top:0;left:0;bottom:0;right:0;"> <script> draw3p(undefined, // List of expected amp-ad types. ['allowed-ad-type1', 'allowed-ad-type2'], // List of hostnames that are allowed to embed this change. // Please also use ALLOW-FROM X-Frame-Options to get security in // browsers that do not support location.ancestorOrigins. ['your-domain.com']); </script> </div> <script>if (window.docEndCallback) window.docEndCallback()</script> </body> </html>