Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
ImprovedTube authored Aug 22, 2024
1 parent abe2657 commit 9def070
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions js&css/web-accessible/www.youtube.com/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand All @@ -815,11 +816,10 @@ ImprovedTube.playerFitToWinButton = function () {
<path d="M21 3 9 15"/><path d="M12 3H3v18h18v-9"/><path d="M16 3h5v5"/><path d="M14 15H9v-5"/></svg>`);

// Ensure the SVG element is correctly parsed
const svg = tempContainer.querySelector('svg');
} else { let tempContainer = document.createElement("div");
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">
<path d="M21 3 9 15"/><path d="M12 3H3v18h18v-9"/><path d="M16 3h5v5"/><path d="M14 15H9v-5"/></svg>`;
const svg = tempContainer.firstChild;}
// const svg = tempContainer.querySelector('svg');
} 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">
<path d="M21 3 9 15"/><path d="M12 3H3v18h18v-9"/><path d="M16 3h5v5"/><path d="M14 15H9v-5"/></svg>`;}
const svg = tempContainer.firstChild;
this.createPlayerButton({
id: 'it-fit-to-win-player-button',
child: svg,
Expand Down

0 comments on commit 9def070

Please sign in to comment.