Merge branch 'master' into multisite
This commit is contained in:
commit
84f8ebcbea
@ -22,9 +22,12 @@ AntiAutoplay =
|
|||||||
|
|
||||||
process: (root) ->
|
process: (root) ->
|
||||||
for iframe in $$ 'iframe[src*="youtube"][src*="autoplay=1"]', root
|
for iframe in $$ 'iframe[src*="youtube"][src*="autoplay=1"]', root
|
||||||
iframe.src = iframe.src.replace(/\?autoplay=1&?/, '?').replace('&autoplay=1', '')
|
AntiAutoplay.processVideo iframe, 'src'
|
||||||
$.addClass iframe, 'autoplay-removed'
|
|
||||||
for object in $$ 'object[data*="youtube"][data*="autoplay=1"]', root
|
for object in $$ 'object[data*="youtube"][data*="autoplay=1"]', root
|
||||||
object.data = object.data.replace(/\?autoplay=1&?/, '?').replace('&autoplay=1', '')
|
AntiAutoplay.processVideo object, 'data'
|
||||||
$.addClass object, 'autoplay-removed'
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
processVideo: (el, attr) ->
|
||||||
|
el[attr] = el[attr].replace(/\?autoplay=1&?/, '?').replace('&autoplay=1', '')
|
||||||
|
el.style.display = 'block' if window.getComputedStyle(el).display is 'hidden'
|
||||||
|
$.addClass el, 'autoplay-removed'
|
||||||
|
|||||||
@ -156,10 +156,9 @@ audio.controls-added {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
:root.anti-autoplay .autoplay-removed {
|
:root.anti-autoplay .autoplay-removed {
|
||||||
display: block !important;
|
|
||||||
visibility: visible !important;
|
visibility: visible !important;
|
||||||
min-width: 640px;
|
min-width: 640px;
|
||||||
min-height: 390px;
|
min-height: 360px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* fixed, z-index */
|
/* fixed, z-index */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user