Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AdamWr opened this issue May 16, 2024 · 1 comment
Assignees
Labels
bug Something isn't working Priority: P4

Comments

@AdamWr
Copy link
Member

AdamWr commented May 16, 2024

It seems that click2load.html redirect doesn't work correctly in the extension.
Related to - AdguardTeam/AdguardFilters#179334

Steps to reproduce:

  1. Add this rule:
embed$subdocument,redirect=click2load.html,important
  1. Go to - https://example.org/
  2. In browser console run:
(() => {
  const video = '<iframe width="560" height="315" src="https://www.youtube.com/embed/Fy2rtb95QhY" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
  const createDiv = document.createElement("div");
  document.body.appendChild(createDiv);
  createDiv.innerHTML = video;
})();
  1. Click on the button to load player

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

Screenshots

image

image

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

@ameshkov
Copy link
Member

Most likely this is an extension bug

@adguard-bot adguard-bot changed the title click2load.html doesn't work correctly in the extension Fix 'click2load.html' — redirect does not work correctly in the extension Oct 21, 2024
@slavaleleka slavaleleka added the bug Something isn't working label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Priority: P4
Projects
None yet
Development

No branches or pull requests

5 participants