youtuberepeat

Youtube Repeat Tool

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==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);
    };
})();