Stop YouTube Video Download

Stops YouTube Video From Downloading.

Od 27.09.2014.. Pogledajte najnovija verzija.

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

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.

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

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

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        Stop YouTube Video Download
// @namespace   http://userscripts.org/users/sknepal
// @description Stops YouTube Video From Downloading.
// @include        http://*.youtube.com/*
// @include        http://youtube.com/*
// @include        https://*.youtube.com/*
// @include        https://youtube.com/*
// @grant       none
// @version     1.3
// ==/UserScript==

/* CHANGE LOG
1.3 (9/27/2014)  : removed return statement that was causing the error.
1.2 (1/27/2014)  : made it support Youtube 'red bar' feature (SPF).
                   thanks to JoeSimmons for the idea : http://userscripts.org/scripts/show/174846
1.1 (08/18/2013) : removed pauseVideo option.
1.0 (07/21/2013) : created.

*/

var btn_id = 'stop-download';

function checkButton() {
    var button = document.getElementById(btn_id);
    if (button == null) {
        addButton();
    }
}

function addButton() {
    var cont = document.getElementById('watch7-user-header');
    var btn = document.createElement('button');
    lastContainerChild = cont.lastElementChild;
    btn.id = 'stop-download';
    btn.setAttribute('type', 'button');
    btn.setAttribute('title', 'Stop Youtube Download');
    btn.setAttribute('data-tooltip', 'Stop Youtube Download');
    btn.setAttribute('data-tooltip-title', 'Stop Youtube Download');
    btn.setAttribute('class', 'yt-subscription-button yt-uix-button yt-uix-button-subscribe-branded');
    btn.style.marginLeft = '10px';
    var txt = document.createElement('span');
    txt.setAttribute('id','stpdownload');      
    txt.appendChild(document.createTextNode('Stop Video'));
    txt.setAttribute('class', 'yt-uix-button-content');
    btn.appendChild(txt);
    cont.appendChild(btn);
    btn.addEventListener('click',stopvidload, true);
}


function stopvidload(){
    var p;
    document.getElementById("movie_player-flash") ? p = document.getElementById("movie_player-flash") : null;
    document.getElementById("movie_player") ? p = document.getElementById("movie_player") : null;
    p.stopVideo();

}
    window.setInterval(checkButton, 1000);