How can I prevent injection of darkreader--font-fix styles in documentPicturePicture window (in Chrome or other Chromium browsers) #15236
-
|
I'm having an issue where dark reader is injecting To reproduce:
const btn = document.createElement('button');
btn.textContent = "Show window";
document.body.appendChild(btn);
btn.addEventListener('click', async () => {
const pipWin = await documentPictureInPicture.requestWindow();
const darkReaderLock = document.createElement("meta");
darkReaderLock.name = "darkreader-lock";
pipWin.document.head.appendChild(darkReaderLock);
});
btn.click();
<html>
<head>
<meta name="darkreader-lock">
<style class="darkreader darkreader--font-fix">...</style>
</head>
<body></body>
</html>Is there some other way to prevent these styles from being added? Or am I going about this the wrong way... |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
|
Small question. As I understand I need some spotify installed or something? I tried to reproduce and nothing happened afer running script in console. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for the way to reproduce the issue. Indeed there was a bug in cleaning up the style, and no support for the meta tag, since picture-in-picture is a separate document. Fixed just now, so expect the patch in 1-2 weeks. |
Beta Was this translation helpful? Give feedback.
Thank you for the way to reproduce the issue. Indeed there was a bug in cleaning up the style, and no support for the meta tag, since picture-in-picture is a separate document. Fixed just now, so expect the patch in 1-2 weeks.