Greasy Fork

Greasy Fork is available in English.

YouTube SaveFrom MP3 + MP4 Tuşları

CTRL+SHIFT: MP4 indir | CTRL+ALT: MP3 indir — ikisi de aynı sitede, otomatik gönderir, sen seçersin.

当前为 2025-06-13 提交的版本,查看 最新版本

// ==UserScript==
// @name         YouTube SaveFrom MP3 + MP4 Tuşları
// @namespace    http://tampermonkey.net/
// @version      6.0
// @description  CTRL+SHIFT: MP4 indir | CTRL+ALT: MP3 indir — ikisi de aynı sitede, otomatik gönderir, sen seçersin.
// @author       ali
// @match        https://www.youtube.com/watch*
// @grant        none
// @license MIT
// ==/UserScript==

(function () {
    'use strict';

    window.addEventListener('keydown', function (e) {
        const videoURL = encodeURIComponent(window.location.href);
        const savefromBase = "https://en.savefrom.net/1/";

        if (e.ctrlKey && e.shiftKey) {
            window.open(`${savefromBase}${videoURL}.html`, '_blank');
            showToast("MP4 için yönlendiriliyorsun...");
        }

        if (e.ctrlKey && e.altKey) {
            window.open(`${savefromBase}${videoURL}.html`, '_blank');
            showToast("MP3 için yönlendiriliyorsun...");
        }
    });

    function showToast(message) {
        const toast = document.createElement('div');
        toast.textContent = message;
        toast.style.cssText = `
            position: fixed;
            top: 20px;
            right: 20px;
            background: #1f1f1f;
            color: white;
            padding: 12px 20px;
            border-radius: 8px;
            box-shadow: 0 0 10px #00000080;
            font-family: sans-serif;
            z-index: 999999;
            opacity: 0;
            transition: opacity 0.5s ease;
        `;
        document.body.appendChild(toast);
        setTimeout(() => toast.style.opacity = 1, 100);
        setTimeout(() => {
            toast.style.opacity = 0;
            setTimeout(() => toast.remove(), 1000);
        }, 3000);
    }
})();