/
githubmirror
/
amphtml
Обзор
Документация
Войти
/
githubmirror
/
amphtml
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
build-system/tasks/visual-diff/snippets/remove-amp-scripts.js
10 строк
349 B
Kristofer Baxter
♻️ Remove Notice from JS and Markdown (#35717)
19 авг 2021, 21:21
Не верифицирован
19 авг 2021, 21:21
f564b7e
Код
Авторство
О чём код?
/** * @fileoverview This file is executed via Puppeteer's page.evaluate on a * document to remove all <script> tags that import AMP pages. This makes for * cleaner diffs and prevents "double-execution" of AMP scripts when * enableJavaScript=true. */ document.head .querySelectorAll('script[src]') .forEach((node) => node./*OK*/ remove());