Skip to content

Commit 9def070

Browse files
authored
typo
1 parent abe2657 commit 9def070

File tree

1 file changed

+5
-5
lines changed
  • js&css/web-accessible/www.youtube.com

1 file changed

+5
-5
lines changed

js&css/web-accessible/www.youtube.com/player.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,7 @@ FIT-TO-WIN BUTTON
803803
------------------------------------------------------------------------------*/
804804
ImprovedTube.playerFitToWinButton = function () {
805805
if (this.storage.player_fit_to_win_button === true && (/watch\?/.test(location.href))) {
806+
let tempContainer = document.createElement("div");
806807
if (typeof trustedTypes !== 'undefined' && typeof trustedTypes.createPolicy === 'function') {
807808
// Create a Trusted Type policy
808809
const policy = trustedTypes.createPolicy('default', {
@@ -815,11 +816,10 @@ ImprovedTube.playerFitToWinButton = function () {
815816
<path d="M21 3 9 15"/><path d="M12 3H3v18h18v-9"/><path d="M16 3h5v5"/><path d="M14 15H9v-5"/></svg>`);
816817

817818
// Ensure the SVG element is correctly parsed
818-
const svg = tempContainer.querySelector('svg');
819-
} else { let tempContainer = document.createElement("div");
820-
tempContainer.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" id="ftw-icon">
821-
<path d="M21 3 9 15"/><path d="M12 3H3v18h18v-9"/><path d="M16 3h5v5"/><path d="M14 15H9v-5"/></svg>`;
822-
const svg = tempContainer.firstChild;}
819+
// const svg = tempContainer.querySelector('svg');
820+
} else {tempContainer.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" id="ftw-icon">
821+
<path d="M21 3 9 15"/><path d="M12 3H3v18h18v-9"/><path d="M16 3h5v5"/><path d="M14 15H9v-5"/></svg>`;}
822+
const svg = tempContainer.firstChild;
823823
this.createPlayerButton({
824824
id: 'it-fit-to-win-player-button',
825825
child: svg,

0 commit comments

Comments
 (0)