Skip to content

Commit b6799ab

Browse files
committed
Fix #430
1 parent 294e002 commit b6799ab

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

chrome/content.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,11 +795,16 @@
795795
player.dataset.oldMargin = player.style.margin;
796796
}
797797

798+
if (player.style.contain && player.style.contain !== 'paint') {
799+
player.dataset.oldContain = player.style.contain;
800+
}
801+
798802
player.style.setProperty('width', '0px', 'important');
799803
player.style.setProperty('height', '0px', 'important');
800804
player.style.setProperty('overflow', 'hidden', 'important');
801805
player.style.setProperty('margin', '0px', 'important');
802806
player.style.setProperty('transition', 'none', 'important');
807+
player.style.setProperty('contain', 'paint', 'important');
803808
}
804809

805810
function showSoft(player) {
@@ -816,6 +821,9 @@
816821
if (player.style.margin === '0px') {
817822
player.style.margin = player.dataset.oldMargin || '';
818823
}
824+
if (player.style.contain === 'paint') {
825+
player.style.contain = player.dataset.oldContain || '';
826+
}
819827
}
820828

821829
function updateReplacedPlayers(convert = null) {

0 commit comments

Comments
 (0)