AdguardTeam / AdguardTeam/Scriptlets

Fix 'click2load.html' — redirect does not work correctly in the extension

未关闭
#428 1 条评论 0 个 reaction 已指派 1 人 已被 @maximtop 认领 在 GitHub 查看
bug Priority: P4
主要语言
JavaScript
星标
195
派生
33
PR 合并指标
30 天内没有已合并 PR

描述

It seems that `click2load.html` redirect doesn't work correctly in the extension.
Related to - https://github.com/AdguardTeam/AdguardFilters/issues/179334

Steps to reproduce:
1. Add this rule:
```adblock
embed$subdocument,redirect=click2load.html,important
```
2. Go to - https://example.org/
3. In browser console run:
```js
(() => {
const video = '';
const createDiv = document.createElement("div");
document.body.appendChild(createDiv);
createDiv.innerHTML = video;
})();
```
4. Click on the button to load player

It looks like that script in `click2load.html` is blocked by `Content Security Policy`.
Screenshots

![image](https://github.com/AdguardTeam/Scriptlets/assets/29142494/b9d303f8-c0e1-4c75-98f8-e5867d7aba18)

![image](https://github.com/AdguardTeam/Scriptlets/assets/29142494/923c1ecb-9900-42bf-8c5b-598ef67a9f98)

This issue doesn't occur in AdGuard for Windows, so I'm not sure if it's extension or scriptlets issue.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。