SKLive Editor

Modify SKLive Layout

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

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.

You will need to install a user script manager extension to install this script.

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

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.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

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