AntiAutoplay update: Make videos visible in https://boards.4chan.org/g/thread/49036627.

This commit is contained in:
ccd0 2015-07-15 14:15:59 -07:00
parent 60dd502188
commit dea45c641a
2 changed files with 5 additions and 1 deletions

View File

@ -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 */

View File

@ -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