是否可以使用清单 v3 将谷歌分析添加到 Chrome 扩展中?我怎样才能做到这一点 ?
我从 stackoverflow 找到了这篇文章:Add Google Analytics to a Chrome Extension,所以我尝试将代码放入接受的答案中,
"content_security_policy": {
"extension_pages": "script-src 'self' https://ssl.google-analytics.com; object-src 'self'"
}
Run Code Online (Sandbox Code Playgroud)
进入我的manifest.json,但是当我加载我的扩展时,我收到了这个错误: 'content_security_policy.extension_pages': Insecure CSP value "https://ssl.google-analytics.com" in directive 'script-src'.
我觉得现在不可能将谷歌分析与 chrome 扩展一起使用,但这很奇怪,因为在 chrome 网上商店仪表板中,我们可以看到这个字段: https: //i.stack.imgur.com/RVv59.jpg
我错过了什么 ?
javascript google-analytics google-chrome-extension manifest.json
我发现了一个奇怪的行为,我想知道我是否滥用了 JPA 或者它是否是 Spring 回归。
这是我的实体:
@Entity
public class Brand {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(nullable = false)
@EqualsAndHashCode.Include
@Schema(description = "Brand's id", example = "1")
private Long id;
// ...
}
@Entity
public class Product {
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "product_brands", joinColumns = @JoinColumn(name = "product_id"),
inverseJoinColumns = @JoinColumn(name = "brands_id"))
private List<Brand> brands;
// ...
}
Run Code Online (Sandbox Code Playgroud)
我有这个请求:
@Query("select new com.mypackage.Statistic(br, count(p)) " +
"from Lot l join l.products p join p.brands br " +
"group by br …Run Code Online (Sandbox Code Playgroud) <input #input (input)="input.value=$event.target.value.toUpperCase()">
Run Code Online (Sandbox Code Playgroud)
<input oninput="this.value = this.value.toUpperCase()">
Run Code Online (Sandbox Code Playgroud)
但不是我的用例,因为我不想复制我的 html 标签,因为我在这个领域有很多配置,这会导致重复的代码,我只能修改一个输入标签而不是另一个,并引入一个错误。 ...因此,我不想使用这个:
<input *ngIf="uppercase" oninput="this.value = this.value.toUpperCase()">
<input *ngIf="!uppercase">
Run Code Online (Sandbox Code Playgroud)
我会使用这样的东西(但这当然不起作用):
<input oninput="if ({{this.uppercase}}) { this.value = this.value.toUpperCase();} ">
Run Code Online (Sandbox Code Playgroud)