From 9def0707e22d4d910f928c8545bc1869d93bf81c Mon Sep 17 00:00:00 2001 From: ImprovedTube Date: Thu, 22 Aug 2024 09:52:51 +0200 Subject: [PATCH] typo --- js&css/web-accessible/www.youtube.com/player.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js&css/web-accessible/www.youtube.com/player.js b/js&css/web-accessible/www.youtube.com/player.js index 09324954e..669f702fb 100644 --- a/js&css/web-accessible/www.youtube.com/player.js +++ b/js&css/web-accessible/www.youtube.com/player.js @@ -803,6 +803,7 @@ FIT-TO-WIN BUTTON ------------------------------------------------------------------------------*/ ImprovedTube.playerFitToWinButton = function () { if (this.storage.player_fit_to_win_button === true && (/watch\?/.test(location.href))) { + let tempContainer = document.createElement("div"); if (typeof trustedTypes !== 'undefined' && typeof trustedTypes.createPolicy === 'function') { // Create a Trusted Type policy const policy = trustedTypes.createPolicy('default', { @@ -815,11 +816,10 @@ ImprovedTube.playerFitToWinButton = function () { `); // Ensure the SVG element is correctly parsed - const svg = tempContainer.querySelector('svg'); - } else { let tempContainer = document.createElement("div"); - tempContainer.innerHTML = ` - `; - const svg = tempContainer.firstChild;} + // const svg = tempContainer.querySelector('svg'); + } else {tempContainer.innerHTML = ` + `;} + const svg = tempContainer.firstChild; this.createPlayerButton({ id: 'it-fit-to-win-player-button', child: svg,