SKLive Editor

Modify SKLive Layout

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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

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

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

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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.

(I already have a user style manager, let me install it!)

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