Untitled

 avatar
unknown
javascript
2 years ago
1.3 kB
5
Indexable
// ==UserScript==
// @name         KG_Chat_Only
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Modify styles for specified elements on klavogonki.ru/gamelist
// @author       You
// @match        *://klavogonki.ru/gamelist/
// @grant        none
// ==/UserScript==

(function() {
    // Create a <style> tag with the specified class name and CSS rules
    const styleTag = document.createElement('style');
    styleTag.className = 'klavogonki-chat-only';
    styleTag.textContent = `
        /* Remove unnecessary elements */
        .userpanel,
        #userpanel-dummy,
        .notification-bar,
        #head,
        .bar,
        #test,
        .gamelist-create,
        #gamelist,
        .feedback,
        #footer,
        #popup,
        #popalert,
        #popconfirm,
        #top-popup,
        #drop_message {
            display: none !important;
        }

        /* Make chat full screen */
        #chat-container {
            width: 100vw !important;
            height: 100vh !important;
            top: 0 !important;
            bottom: 0 !important;
            left: 0 !important;
            right: 0 !important;
        }
    `;

    // Append the <style> tag to the head of the document
    document.head.appendChild(styleTag);
})();
Editor is loading...
Leave a Comment