SKLive Editor

Modify SKLive Layout

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         SKLive Editor
// @namespace    undefined
// @version      0.6
// @description  Modify SKLive Layout
// @author       Shing
// @match        *://sk-knower.com/*
// @run-at       document-start
// ==/UserScript==

window.onload = function() {
    // Dark Mode of Twitch Chat
    var chat = document.getElementById("chat_ttv");
    if (chat === null) {
        console.log("No embedded chat");
    } else {
        var src_origin = chat.src;
        var isTwitchChat = src_origin.toLowerCase().includes("twitch");
        if (isTwitchChat === true) {
            // have parmeter
            if (src_origin.includes("?")) {
                chat.src = src_origin + "&darkpopout";
            }
            // no parmeter
            else {
                chat.src = src_origin + "?darkpopout";
            }
            console.log("Twitch chat is in dark mode");
        } else {
            console.log("Other chat is detected and do nothing");
        }
    }

    // Extend chat window height
    $('#chat_under').hide();
  
    // collapse left following bar
    $("#opennav").click();
  
    // auto extend player height
    downplayer();
  
    // Remove AdBlock Suggestion
    setCookie("closeadsuggest2", "true", 999);
    var popUp = document.getElementById("asuggest");
    if (popUp === null) {
        console.log("No adBlock suggestion");
    } else {
        closeadbsuggest();
        console.log("AdBlock suggestion popup is removed");
    }
}