diff options
Diffstat (limited to 'youtube-turn-off-annotations.user.js')
| -rw-r--r-- | youtube-turn-off-annotations.user.js | 26 | 
1 files changed, 26 insertions, 0 deletions
| diff --git a/youtube-turn-off-annotations.user.js b/youtube-turn-off-annotations.user.js new file mode 100644 index 0000000..c4d3106 --- /dev/null +++ b/youtube-turn-off-annotations.user.js @@ -0,0 +1,26 @@ +// ==UserScript== +// @name YouTube Turn Off Annotations +// @description Turn off video annotation overlays on YouTube videos +// @namespace com.teddywing +// @match https://www.youtube.com/* +// ==/UserScript== + + +var annotations_menu_item = document.evaluate( +	"//div[contains(@class, 'ytp-settings-menu')] \ +		//div[ \ +			@aria-checked='true' and \ +			//div[ \ +				contains(@class, 'ytp-menuitem-label') and \ +				contains(., 'Annotations') \ +			] \ +		]", +	document, +	null, +	XPathResult.FIRST_ORDERED_NODE_TYPE, +	null +); + +if (annotations_menu_item) { +	annotations_menu_item.singleNodeValue.click(); +} | 
