HasYoutube

Bu eklenti youtube için yazılmış oynatıcı içerir.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         HasYoutube
// @namespace    https://hascoding.com
// @version      2024-01-02@06
// @description  Bu eklenti youtube için yazılmış oynatıcı içerir.
// @author       HASANERYILMAZ
// @match        https://www.youtube.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant        none
// @license      HasCoding
// ==/UserScript==

(function() {
    'use strict';

    var v;

    function checkurl () {
        var url = window.location.href;
        var parts = url.split("?");
        var params = parts[1].split("&");
        for (var i = 0; i < params.length; i++) {
            var pair = params[i].split("=");
            if (pair[0] == "v") {
                v = pair[1];
            }
            break;
        }
    }

    function replaceDivWithIframe() {
        var div = document.getElementById("player");
        div.innerHTML = "";
        var iframe = document.createElement("iframe");
        iframe.id = "HasPlayer";
        iframe.width = "100%";
        iframe.height = "600";
        iframe.src = "https://www.youtube.com/embed/"+v+"?autoplay=1";
        iframe.style.border = "none";
        div.appendChild(iframe);
    }

    function checkV() {
        var url = window.location.href;
        var parts = url.split("?");
        var params = parts[1].split("&");
        var yeniv;
        for (var i = 0; i < params.length; i++) {
            var pair = params[i].split("=");
            if (pair[0] == "v") {
                yeniv = pair[1];
            }
        }
        if (yeniv != v) {
            v = yeniv;
            replaceDivWithIframe();
        }
    }
    setInterval(checkV, 10000);

})();