From dea45c641a034afcd8c11fcde6e3ba9fa645e839 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Wed, 15 Jul 2015 14:15:59 -0700 Subject: [PATCH] AntiAutoplay update: Make videos visible in https://boards.4chan.org/g/thread/49036627. --- src/General/css/style.css | 4 +++- src/Miscellaneous/AntiAutoplay.coffee | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/General/css/style.css b/src/General/css/style.css index 32c8bd548..4c0c788f1 100755 --- a/src/General/css/style.css +++ b/src/General/css/style.css @@ -127,8 +127,10 @@ audio.controls-added { height: auto; text-align: center; } -:root.anti-autoplay center iframe { +:root.anti-autoplay .autoplay-removed { display: block !important; + min-width: 640px; + min-height: 390px; } /* fixed, z-index */ diff --git a/src/Miscellaneous/AntiAutoplay.coffee b/src/Miscellaneous/AntiAutoplay.coffee index 7d11f2b85..a646c81fa 100644 --- a/src/Miscellaneous/AntiAutoplay.coffee +++ b/src/Miscellaneous/AntiAutoplay.coffee @@ -26,6 +26,8 @@ AntiAutoplay = process: (root) -> for iframe in $$ 'iframe[src*="youtube"][src*="autoplay=1"]', root iframe.src = iframe.src.replace(/\?autoplay=1&?/, '?').replace('&autoplay=1', '') + $.addClass iframe, 'autoplay-removed' for object in $$ 'object[data*="youtube"][data*="autoplay=1"]', root object.data = object.data.replace(/\?autoplay=1&?/, '?').replace('&autoplay=1', '') + $.addClass object, 'autoplay-removed' return \ No newline at end of file