Skip to content

Commit

Permalink
changed canvas resolution formula
Browse files Browse the repository at this point in the history
  • Loading branch information
Krazete committed Apr 27, 2024
1 parent 40f5a54 commit 90db644
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ytglow.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ var fograf;
function updatefog() {
var video = document.querySelector("ytd-watch-flexy video") || document.querySelector("video");
var rect = video.getBoundingClientRect();
canvas.width = rect.width / 8;
canvas.height = rect.height / 8;
canvas.width = 64;
canvas.height = 64 * rect.height / rect.width;
canvas.style.width = rect.width + "px";
canvas.style.height = rect.height + "px";
context.drawImage(video, 0, 0, canvas.width, canvas.height);
Expand Down

0 comments on commit 90db644

Please sign in to comment.