Merge branch 'master' into multisite
This commit is contained in:
commit
84f8ebcbea
@ -22,9 +22,12 @@ 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'
|
||||
AntiAutoplay.processVideo iframe, 'src'
|
||||
for object in $$ 'object[data*="youtube"][data*="autoplay=1"]', root
|
||||
object.data = object.data.replace(/\?autoplay=1&?/, '?').replace('&autoplay=1', '')
|
||||
$.addClass object, 'autoplay-removed'
|
||||
AntiAutoplay.processVideo object, 'data'
|
||||
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;
|
||||
}
|
||||
:root.anti-autoplay .autoplay-removed {
|
||||
display: block !important;
|
||||
visibility: visible !important;
|
||||
min-width: 640px;
|
||||
min-height: 390px;
|
||||
min-height: 360px;
|
||||
}
|
||||
|
||||
/* fixed, z-index */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user