Explorar el Código

fix(平台适配): 移除 Google 构建中的 exitapi.js 外部引用

- Google h5validator 不允许 tpc.googlesyndication.com 外部脚本引用
- ExitApi 由 Google 广告运行环境注入,无需自行加载
- 保留 ExitApi.exit() 调用即可通过静态检查
guoziyun hace 3 semanas
padre
commit
31ce96eb12
Se han modificado 1 ficheros con 0 adiciones y 8 borrados
  1. 0 8
      vite.config.js

+ 0 - 8
vite.config.js

@@ -23,14 +23,6 @@ function patchSingleFileHtml(htmlPath, adapter) {
     .replace(/<style\s+crossorigin\s+rel="stylesheet">/g, "<style>")
     .replace(/<style\s+crossorigin>/g, "<style>");
 
-  // Google 平台需要引入 exitapi.js,CTA 才能正常跳转
-  if (adapter === "google") {
-    html = html.replace(
-      "</head>",
-      '<script src="https://tpc.googlesyndication.com/pagead/js/exitapi.js"></script></head>',
-    );
-  }
-
   fs.writeFileSync(htmlPath, html);
 }