Youtube Downloader

try to take over the world!

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Youtube Downloader
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  try to take over the world!
// @author       Skl
// @match        https://www.youtube.com/*
// @match        https://ru.savefrom.net/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    setInterval(setDownloader, 1000);
    function setDownloader() {
        let info = document.getElementById('info');
        let infoText = document.getElementById('info-text');
        let buttonChoose = document.getElementById('buttonChoose');
        let choose = document.getElementById('choose');
        let newOption1 = new Option('360', '360');
        let newOption2 = new Option('720', '720');
        let link = document.querySelector('.link');
        let selected_Index;
        if (link) {
            window.onload = link.click();
        };
        if (!buttonChoose) {
            buttonChoose = document.createElement('button');
            buttonChoose.innerText = 'Download';
            buttonChoose.setAttribute('id', 'buttonChoose');
            buttonChoose.setAttribute('target', '_blank');
            document.querySelector('#info-text').appendChild(buttonChoose);
            choose = document.createElement('select');
            choose[0] = newOption1;
            choose[1] = newOption2;
            choose.setAttribute('id', 'choose');
            document.querySelector('#info-text').appendChild(choose);
        }
        let letDownload = 'https://ssyoutube.com/watch' + window.location.search;
        buttonChoose.onclick =
            function() {
            let newWindow = window.open(letDownload, '_blank');
            };
        info.style.overflove = 'visible';
        infoText.style.maxHeight = '4.1rem';
        infoText.style.overflove = 'visible';
        buttonChoose.style.background = '#46FF27';
        buttonChoose.style.padding = '3px';
        buttonChoose.style.borderRadius = '10px';
        buttonChoose.style.color = '#FF8703';
        buttonChoose.style.fontFamily = 'Ubuntu';
        buttonChoose.style.outline = 'none';
        buttonChoose.style.margin = '13px';
        choose.style.background = '#46FF27';
        choose.style.padding = '3px';
        choose.style.outline = 'none';
    }
    // Your code here...
})();