1
Fork 0

youtube: display tags as hover text on title

This commit is contained in:
Conduitry 2020-04-27 18:37:17 -04:00
parent e3cf1ed586
commit bdeb45617a
2 changed files with 4 additions and 2 deletions

View File

@ -3,7 +3,7 @@
* [e621 thing](https://chor.date/e621.user.js) - A script to make browsing e621.net while not signed in more convenient, and to work around the global blacklist forced on anonymous users.
* [e926 thing](https://chor.date/e926.user.js) - A script to redirect you from e926.net to e621.net.
* [TV Tropes thing](https://chor.date/tvtropes.user.js) - A script to remove the "This is page #x you have viewed this month without ads" banner.
* [YouTube thing](https://chor.date/youtube.user.js) - A script to unset autoplay.
* [YouTube thing](https://chor.date/youtube.user.js) - A script to unset autoplay and display hidden video tags.
## License

View File

@ -1,7 +1,7 @@
// ==UserScript==
// @name YouTube thing
// @namespace https://chor.date
// @description A script to unset autoplay.
// @description A script to unset autoplay and display hidden video tags.
// @match https://www.youtube.com/*
// @icon https://www.youtube.com/favicon.ico
// @version 0
@ -16,5 +16,7 @@
if (el.getAttribute('aria-pressed') === 'true') {
el.dispatchEvent(new MouseEvent('click'));
}
const tags = [...document.querySelectorAll('meta[property="og:video:tag"]')].map(el => el.content).join(', ');
document.querySelectorAll('h1.title').forEach(el => el.title = tags);
}
})();