silly changes

This commit is contained in:
Kebo 2025-06-23 11:34:40 -05:00
parent 05a771d337
commit 514b16a79e
2 changed files with 8 additions and 6 deletions

View file

@ -23,6 +23,8 @@ included on every page. The supported site badge may not show for custom domains
should still work. should still work.
- Youtube: Title, author, and date published fields are autofilled from either the `watch7-content` metadata or the [`VideoObject` JSON-LD schema](https://schema.org/VideoObject). - Youtube: Title, author, and date published fields are autofilled from either the `watch7-content` metadata or the [`VideoObject` JSON-LD schema](https://schema.org/VideoObject).
***WARNING: All data will be cleared when you close the extension's popup. If you are really proud of a note and want to come back to it later... save it somewhere else I guess?***
## Wait, what is this even for? ## Wait, what is this even for?
I have a page on my site called the [sharefeed](https://eleboog.com/sharefeed) where I share links to things I think are interesting. I have a page on my site called the [sharefeed](https://eleboog.com/sharefeed) where I share links to things I think are interesting.

View file

@ -32,10 +32,10 @@ function parsePage() {
const youtubeMetaElem = document.getElementById('watch7-content'); const youtubeMetaElem = document.getElementById('watch7-content');
if (youtubeMetaElem) { if (youtubeMetaElem) {
// url fix // url fix
entry.url = document.querySelector('link[itemprop="url"]').getAttribute('href'); entry.url = youtubeMetaElem.querySelector('link[itemprop="url"]').getAttribute('href');
entry.title = document.querySelector('meta[itemprop="name"]').getAttribute('content'); entry.title = youtubeMetaElem.querySelector('meta[itemprop="name"]').getAttribute('content');
entry.author = document.querySelector('span[itemprop="author"] link[itemprop="name"]').getAttribute('content'); entry.author = youtubeMetaElem.querySelector('span[itemprop="author"] link[itemprop="name"]').getAttribute('content');
entry.publishedDate = document.querySelector('meta[itemprop="datePublished"]').getAttribute('content').slice(0, 19); entry.publishedDate = youtubeMetaElem.querySelector('meta[itemprop="datePublished"]').getAttribute('content').slice(0, 19);
} }
// github scraping // github scraping