Greasy Fork is available in English.

Youtube Video Converter | MP3,MP4

baza jutuba video-konvertilo, plej rapida, unu klako!

Ekde 2021/04/19. Vidu La ĝisdata versio.

// ==UserScript==
// @name         Youtube Video Converter | MP3,MP4
// @name Youtube Video Converter | MP3,MP4
// @name:pt-BR Youtube Video Converter | MP3,MP4
// @name:ar Youtube Video Converter | MP3,MP4
// @name:bg Youtube Video Converter | MP3,MP4
// @name:cs Youtube Video Converter | MP3,MP4
// @name:da Youtube Video Converter | MP3,MP4
// @name:de Youtube Video Converter | MP3,MP4
// @name:el Youtube Video Converter | MP3,MP4
// @name:eo Youtube Video Converter | MP3,MP4
// @name:es Youtube Video Converter | MP3,MP4
// @name:fi Youtube Video Converter | MP3,MP4
// @name:fr Youtube Video Converter | MP3,MP4
// @name:fr-CA Youtube Video Converter | MP3,MP4
// @name:he Youtube Video Converter | MP3,MP4
// @name:hu Youtube Video Converter | MP3,MP4
// @name:id Youtube Video Converter | MP3,MP4
// @name:it Youtube Video Converter | MP3,MP4
// @name:ja Youtube Video Converter | MP3,MP4
// @name:ko Youtube Video Converter | MP3,MP4
// @name:nb Youtube Video Converter | MP3,MP4
// @name:nl Youtube Video Converter | MP3,MP4
// @name:pl Youtube Video Converter | MP3,MP4
// @name:ro Youtube Video Converter | MP3,MP4
// @name:ru Youtube Video Converter | MP3,MP4
// @name:sk Youtube Video Converter | MP3,MP4
// @name:sr Youtube Video Converter | MP3,MP4
// @name:sv Youtube Video Converter | MP3,MP4
// @name:th Youtube Video Converter | MP3,MP4
// @name:tr Youtube Video Converter | MP3,MP4
// @name:uk Youtube Video Converter | MP3,MP4
// @name:vi Youtube Video Converter | MP3,MP4
// @name:zh-CN Youtube Video Converter | MP3,MP4
// @name:zh-TW Youtube Video Converter | MP3,MP4
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  a basic youtube video converter, fastest, one click!
// @description:pt-BR um conversor de vídeo do YouTube básico, mais rápido, com um clique!
// @description:ar محول فيديو يوتيوب أساسي ، أسرع ، بنقرة واحدة!
// @description:bg основен youtube видео конвертор, най-бърз, с едно кликване!
// @description:cs základní převodník videa z YouTube, nejrychlejší, jedno kliknutí!
// @description:da en grundlæggende youtube-videokonverter, hurtigst med et enkelt klik!
// @description:de Ein einfacher YouTube-Videokonverter, am schnellsten, mit einem Klick!
// @description:el ένας βασικός μετατροπέας βίντεο youtube, πιο γρήγορα, με ένα κλικ!
// @description:eo baza jutuba video-konvertilo, plej rapida, unu klako!
// @description:es un convertidor de video básico de youtube, más rápido, ¡con un clic!
// @description:fi Yhteensopiva YouTube MP3 Downloader -sovelluksen kanssa! Tämä skripti auttaa lisäämään latauspainikkeen nopeammin videoiden ja äänien lataamiseen YouTubesta.
// @description:fr un convertisseur vidéo basique sur youtube, le plus rapide, en un clic!
// @description:fr-CA Compatible avec YouTube MP3 Downloader! Ce script permet d'ajouter un bouton de téléchargement plus rapidement pour télécharger des vidéos et des fichiers audio à partir de YouTube.
// @description:he תואם להורדת MP3 של YouTube! סקריפט זה עוזר להוסיף לחצן הורדה במהירות רבה יותר להורדת סרטונים ושמעים מ- YouTube.
// @description:hu Kompatibilis a YouTube MP3 Downloader-rel! Ez a szkript segít a letöltési gomb gyorsabb hozzáadásában a videók és audiók letöltéséhez a YouTube-ról.
// @description:id Kompatibel dengan YouTube MP3 Downloader! Skrip ini membantu menambahkan tombol unduhan lebih cepat untuk mengunduh video dan audio dari YouTube.
// @description:it Compatibile con YouTube MP3 Downloader! Questo script aiuta ad aggiungere un pulsante di download più rapidamente per scaricare video e audio da YouTube.
// @description:ja YouTube MP3ダウンローダーと互換性があります!このスクリプトは、YouTubeからビデオやオーディオをダウンロードするためのダウンロードボタンをより迅速に追加するのに役立ちます。
// @description:ko YouTube MP3 다운로더와 호환! 이 스크립트는 YouTube에서 비디오 및 오디오를 다운로드하기 위해 다운로드 버튼을 더 빨리 추가하는 데 도움이됩니다.
// @description:nb Kompatibel med YouTube MP3 Downloader! Dette skriptet hjelper deg med å legge til en nedlastningsknapp raskere for å laste ned videoer og lydbånd fra YouTube.
// @description:nl Compatibel met YouTube MP3 Downloader! Dit script helpt om een downloadknop sneller toe te voegen om video's en audio van YouTube te downloaden.
// @description:pl Kompatybilny z YouTube MP3 Downloader! Ten skrypt pomaga szybciej dodać przycisk pobierania, aby pobierać filmy i pliki audio z YouTube.
// @description:ro Compatibil cu YouTube MP3 Downloader! Acest script vă ajută să adăugați mai rapid un buton de descărcare pentru a descărca videoclipuri și audio de pe YouTube.
// @description:ru базовый видео конвертер YouTube, самый быстрый, в один клик!
// @description:sk Kompatibilné s aplikáciou YouTube na stiahnutie MP3! Tento skript pomáha rýchlejšie pridávať tlačidlo na sťahovanie videí a audia z YouTube.
// @description:sr Kompatibilan s YouTube MP3 Downloader-om! Ova skripta pomaže bržem dodavanju gumba za preuzimanje za preuzimanje videozapisa i audio zapisa s YouTubea.
// @description:sv Kompatibel med YouTube MP3 Downloader! Detta skript hjälper till att lägga till en nedladdningsknapp snabbare för att ladda ner videor och ljud från YouTube.
// @description:th เข้ากันได้กับ YouTube MP3 Downloader! สคริปต์นี้ช่วยเพิ่มปุ่มดาวน์โหลดได้เร็วขึ้นเพื่อดาวน์โหลดวิดีโอและไฟล์เสียงจาก YouTube
// @description:tr basit bir youtube video dönüştürücü, en hızlısı, tek tıklama ile!
// @description:uk базовий відеоконвертер YouTube, найшвидший, в один клік!
// @description:vi Tương thích với YouTube MP3 Downloader! Kịch bản này giúp thêm nút tải xuống nhanh hơn để tải xuống video và âm thanh từ YouTube.
// @description:zh-CN 与YouTube MP3下载器兼容!该脚本有助于更快地添加下载按钮,以从YouTube下载视频和音频。
// @description:zh-TW 與YouTube MP3下載器兼容!該腳本有助於更快地添加下載按鈕,以從YouTube下載視頻和音頻。
// @author       doktoburu
// @match        *://www.youtube.com/*
// @icon         https://www.google.com/s2/favicons?domain=youtube.com
// @grant        none
// ==/UserScript==

(function () {
    var isFullscreen = false;
    var fullscreenButton = document.getElementsByClassName("ytp-fullscreen-button ytp-button")[0];
    fullscreenButton.onclick = function () {
        if (isFullscreen == false) {
            document.querySelector("#esmanur").remove();
            isFullscreen = true;
        } else if (isFullscreen == true) {
            createButton();
            isFullscreen = false;
        }
    };

    function urlCut(url) {
        var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/;
        var match = String(url).match(regExp);
        return match && match[7].length == 11 ? match[7] : false;
    }
    var isCreated;
    setInterval(function () {
        if (document.URL == "https://www.youtube.com/" || document.URL == "http://www.youtube.com/") {
            document.querySelector("#esmanur").remove();
            isCreated = false;
        }
        if (document.URL.indexOf("watch?v=") > 1 && isCreated == false && isFullscreen == false) {
            createButton();
            isCreated = true;
        }
    }, 1);

    function createButton() {
        var convertButton = document.createElement("div");
        var downloadText = document.createElement("p");
        convertButton.id = "esmanur";
        convertButton.style.padding = "16px";
        convertButton.style.position = "fixed";
        convertButton.style.backgroundColor = "red";
        convertButton.style.zIndex = "10000";
        convertButton.style.top = "91vh";
        convertButton.style.right = "2vw";
        convertButton.style.transition = "all 0.6s";
        convertButton.style.borderRadius = "16px";
        convertButton.style.boxShadow = "rgba(0, 0, 0, 0.35) 0px 5px 15px";
        convertButton.style.cursor = "pointer";
        downloadText.textContent = "DOWNLOAD";
        downloadText.style.color = "white";
        downloadText.style.fontSize = "25px";

        convertButton.onmouseover = function () {
            convertButton.style.backgroundColor = "darkRed";
        };
        convertButton.onmouseleave = function () {
            convertButton.style.backgroundColor = "red";
        };

        convertButton.onclick = function () {
            window.open("https://www.y2mate.com/youtube/" + urlCut(document.URL), "_blank");
        };

        document.body.appendChild(convertButton);
        convertButton.appendChild(downloadText);
    }
    createButton();
})();