Greasy Fork

Shined up real nice.

youtuberepeat

Youtube Repeat Tool

After trying this script, you can ask a question about it, review it, or report it.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// ==UserScript==
// @name        youtuberepeat
// @namespace   qqboxy
// @description Youtube Repeat Tool
// @match     http://www.youtube.com/*
// @match     https://www.youtube.com/*
// @version     2.3.2
// ==/UserScript==
(function () {
	var BUTTON_TEXT = {
		'zh-TW':'重複播放',
		'en' : 'Repeat'
	};
	var BUTTON_TOOLTIP = {
		'zh-TW':'自動重複播放此影片',
		'en' : 'Repeat videos automatically'
	};
	var url = "http://youtuberepeat.blogspot.com/?" + location.href;
	var language = document.documentElement.getAttribute('lang');
	var buttonText = (BUTTON_TEXT[language])?BUTTON_TEXT[language]:BUTTON_TEXT['en'];
	var buttonTootip = (BUTTON_TOOLTIP[language])?BUTTON_TOOLTIP[language]:BUTTON_TOOLTIP['en'];
	document.getElementById("watch8-secondary-actions").innerHTML += "<span><a href=\""+url+"\"><button class=\"yt-uix-button yt-uix-button-size-default yt-uix-button-opacity yt-uix-tooltip\" data-tooltip-text=\""+buttonTootip+"\" title=\""+buttonTootip+"\"><span class=\"yt-uix-button-content\">↺ "+buttonText+"</span></button></a></span>";
})();