Untitled

mail@pastecode.io avatar
unknown
javascript
6 months ago
1.3 kB
3
Indexable
Never
// ==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);
})();
Leave a Comment