Double video playback when there's no age confirmation
This script does get rid of the age confirmation nonsense. It's a welcome relief, since the warning would otherwise be slapped on videos that carry no age rating, and there are lots of those.
However, on videos without any age warning, I get doubled audio, suggesting that there's another copy of the video playing in the background. I've tested in Firefox with the HTML5 player only (example videos: Green • No rating). This is how I fixed it locally:
var el = document.getElementById('unavailable-submessage'); if (el) var ell = el.childNodes.length; else var ell = 0; if (ell > 1) { …
This way, the script only does something if the element has more than one child node (in the case of videos with no age warning, the element still has a child text node).
Double video playback when there's no age confirmation
This script does get rid of the age confirmation nonsense. It's a welcome relief, since the warning would otherwise be slapped on videos that carry no age rating, and there are lots of those.
However, on videos without any age warning, I get doubled audio, suggesting that there's another copy of the video playing in the background. I've tested in Firefox with the HTML5 player only (example videos: Green • No rating). This is how I fixed it locally:
var el = document.getElementById('unavailable-submessage');
if (el) var ell = el.childNodes.length;
else var ell = 0;
if (ell > 1) {
…
This way, the script only does something if the element has more than one child node (in the case of videos with no age warning, the element still has a child text node).