Fix onclick handler for blurred videos on Chrome
This commit is contained in:
parent
a856b9d01b
commit
6c618d1a0c
|
@ -133,9 +133,11 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||||
node.addEventListener("click", e => {
|
node.addEventListener("click", e => {
|
||||||
if (node.classList.contains("blurred-explicit")) {
|
if (node.classList.contains("blurred-explicit")) {
|
||||||
node.classList.remove("blurred-explicit");
|
node.classList.remove("blurred-explicit");
|
||||||
|
if (node.tagName.toLowerCase() !== "video") {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Video tag: autoplay is disabled when blurred, onClick doesn't fire,
|
// Video tag: autoplay is disabled when blurred, onClick doesn't fire,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user