Animoto Download

Add Animoto download link

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

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

    }

}