Animoto Download

Add Animoto download link

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Animoto Download
// @namespace    https://animoto.com/
// @include      https://animoto.com/*
// @version      0.1
// @description  Add Animoto download link
// @author       Daniel Shanklin
// @grant        none
// @run-at       document-end
// ==/UserScript==

start();

function start() {

    var elements = document.getElementsByClassName('h4 small'),
        n = elements.length;
    for (var i = 0; i < n; i++) {
        var e = elements[i];

        run(e);
    }


}

function run(e) {

    if (!document.getElementById("parentButton")) {

        var parentButton = document.createElement("div");

        parentButton.className = "blabla";
        parentButton.id = "parentButton";
        parentButton.style = "height: 23px;margin-left: 28px;padding-bottom:1px;";

        parentButton.onclick = function() {
            //this.style = "display:none";
        };

        e.appendChild(parentButton);

        var childButton = document.createElement("a");

        childButton.appendChild(document.createTextNode("Click here to download Animoto Video as MP4"));

        childButton.className = "blabl2";
        childButton.style = "line-height: 25px;font-size: 24px; color: red; text-decoration: underline;";


        var VidID = window.location.href;
        VidID = VidID.replace("https://animoto.com/play/", "");

        childButton.href = "http://s3-p.animoto.com/Video/" + VidID + "/360p.mp4";

        parentButton.appendChild(childButton);

    }

}