fix some stuff :3

This commit is contained in:
Ashley 2023-02-10 16:13:02 +00:00
parent 3a9363b460
commit b017d057e4

View file

@ -288,7 +288,7 @@
<noscript> <noscript>
<style> <style>
.auto-play{ .auto-play{
display:none !important;; display:none !important;
} }
</style> </style>
</noscript> </noscript>
@ -1158,10 +1158,27 @@ checkbox.addEventListener('change', function(e) {
document.getElementById('video').addEventListener('ended',autoplaynextvideo,false); document.getElementById('video').addEventListener('ended',autoplaynextvideo,false);
function autoplaynextvideo(e) { function autoplaynextvideo(e) {
location.href = "/watch?v=<%- k.Video.Recommendations.Video[0].id%>" location.href = "/watch?v=<%- k.Video.Recommendations.Video[0].id%>&autoplay=<%-btoa("1f739d935676111cfff4b4693e3816e664797050" + k.Video.Recommendations.Video[0].id ) %>"
} }
} }
if (/[?&]autoplay=/.test(location.search)) {
if(!chebox.check) {
checkbox.checked = true;
}
}
}); });
if (/[?&]autoplay=/.test(location.search)) {
checkbox.checked = true;
console.log("[AUTOPLAY BETA] enabled")
document.getElementById('video').addEventListener('ended',autoplaynextvideo,false);
function autoplaynextvideo(e) {
location.href = "/watch?v=<%- k.Video.Recommendations.Video[0].id%>&autoplay=<%-btoa("1f739d935676111cfff4b4693e3816e664797050" + k.Video.Recommendations.Video[0].id ) %>"
}
}
</script> </script>
<% if (!optout) { %> <% if (!optout) { %>