aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--manifest.json18
-rw-r--r--tooltipise.js7
2 files changed, 25 insertions, 0 deletions
diff --git a/manifest.json b/manifest.json
new file mode 100644
index 0000000..792bdb2
--- /dev/null
+++ b/manifest.json
@@ -0,0 +1,18 @@
+{
+ "manifest_version": 2,
+
+ "name": "YouTube Tooltipise Titles",
+ "description": "Add title tooltips to video titles on YouTube so you can read them even after ellipsis truncation",
+ "version": "0.0.1",
+
+ "content_scripts": [
+ {
+ "matches": ["*://*.youtube.com/*"],
+ "js": ["tooltipise.js"]
+ }
+ ],
+
+ "permissions": [
+ "*://*.youtube.com/*"
+ ]
+}
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);
+ }
+})()