github-now icon indicating copy to clipboard operation
github-now copied to clipboard

fix youtube display

Open christianboyle opened this issue 3 years ago • 0 comments

It seems like some items are not returning what we expect for YouTube.

I fixed 3 of the selectors (seems like markup changes broke the previous selectors):

document.querySelector('ytd-channel-name').innerText,
document.querySelector('link[itemprop="thumbnailUrl"]').href,
document.querySelector('link[rel="canonical"]').href,

One thing that was changed is the item href now points to the video being shown rather than the channel home page. This seems more consistent (that's how SoundCloud works, etc.).

Broken: 2021-12-18_01-38-01PM

Fixed: 2021-12-18_04-35-20PM

To build:

git clone [email protected]:christianboyle/github-now.git
cd github-now
git checkout fix_youtube
yarn
yarn add [email protected] (this was required to get the project to build)
cd src/options
yarn
cd ../../
npm run build:all

christianboyle avatar Dec 19 '21 14:12 christianboyle