HasYoutube

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

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

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

})();