YouTube Unblocker

Adds menu button to automatically forward any currently blocked YouTube video to youtubeunblocker.org and unblocks the video.

Stan na 12-07-2016. Zobacz najnowsza wersja.

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

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

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        YouTube Unblocker
// @namespace    YTUB
// @version      3.0
// @description  Adds menu button to automatically forward any currently blocked YouTube video to youtubeunblocker.org and unblocks the video.
// @author       drhouse
// @include      https://www.youtube.com/*
// @include      http://www.youtubeunblocker.org/
// @grant        GM_getValue
// @grant        GM_setValue
// @grant        GM_deleteValue
// @grant        GM_registerMenuCommand
// @grant        GM_notification
// @grant        GM_getResourceText
// @resource spfremove https://greasyfork.org/scripts/16935-disable-spf-youtube/code/Disable%20SPF%20Youtube.user.js
// @require      http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @icon         https://s.ytimg.com/yts/img/favicon-vfldLzJxy.ico
// @locale       en
// ==/UserScript==
$(document).ready(function () {

    eval(GM_getResourceText("spfremove"));

    GM_registerMenuCommand("YouTube Unblocker", function(){
        if (location != "http://www.youtubeunblocker.org/"){
            var here = top.location.href;
            var title = document.title;
            GM_deleteValue("ytube");
            GM_deleteValue("ytubetitle");
            GM_setValue("ytube", here);
            GM_setValue("ytubetitle", title);
            window.location.href = 'http://www.youtubeunblocker.org/';
        }
    });

    if (location == "http://www.youtubeunblocker.org/"){
        var target = 'body > div.main_bg > div.container > div:nth-child(12) > div.main_form_container > div > form > p';
        var target1 = target + ' > input.form';
        var target2 = target + ' > input.button';
        var storedObject = GM_getValue("ytube"); 
        var storedObjectTitle = GM_getValue("ytubetitle");
        var msg = new SpeechSynthesisUtterance('Now unblocking ' + storedObjectTitle);
        msg.lang = 'en-US';
        window.speechSynthesis.speak(msg);
        $(target1).val(storedObject);
        GM_notification(storedObjectTitle, "Unblocking");
        $(target2).click();
    }
});