youtuberepeat

Youtube Repeat Tool

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        youtuberepeat
// @namespace   qqboxy
// @description Youtube Repeat Tool
// @match     http://www.youtube.com/*
// @match     https://www.youtube.com/*
// @version     2.3.3
// ==/UserScript==
(function () {
    window.onload = 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("top-level-buttons").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>";
        var span = document.createElement("span");
        span.innerHTML = "<a href=\""+url+"\"><button title=\""+buttonTootip+"\"><span>↺ "+buttonText+"</span></button></a>";
        document.getElementById("count").appendChild(span);
    };
})();