AntiAutoplay update: Make videos visible in https://boards.4chan.org/g/thread/49036627.
This commit is contained in:
parent
60dd502188
commit
dea45c641a
@ -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 */
|
||||
|
||||
@ -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
|
||||
Loading…
x
Reference in New Issue
Block a user