diff options
| author | Teddy Wing | 2014-12-13 12:46:47 -0500 |
|---|---|---|
| committer | Teddy Wing | 2014-12-13 12:46:47 -0500 |
| commit | 13c1c99efdbd748ecfec81bdd07b556022316e79 (patch) | |
| tree | 0c85755831950a224716fcdea07d2c59d7aa80f8 /tooltipise.js | |
| download | chrome-youtube-tooltipise-titles-13c1c99efdbd748ecfec81bdd07b556022316e79.tar.bz2 | |
Initial commit. Working.
Add manifest.json, add functionality in content script that copies the
YouTube video title into the title link's `title=` HTML attribute to
give us the tooltip.
Diffstat (limited to 'tooltipise.js')
| -rw-r--r-- | tooltipise.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tooltipise.js b/tooltipise.js new file mode 100644 index 0000000..8d90aba --- /dev/null +++ b/tooltipise.js @@ -0,0 +1,7 @@ +(function() { + var title_elements = document.querySelectorAll('.yt-uix-sessionlink.yt-uix-tile-link'); + + for (var i = 0; i < title_elements.length; i++) { + title_elements[i].setAttribute('title', title_elements[i].innerText); + } +})() |
