Sidebar [Horizontal]

Puts sidebar elements next to each other in a 2 column 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 or Violentmonkey 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.

(У мене вже є менеджер скриптів, дайте мені встановити його!)

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         Sidebar [Horizontal]
// @namespace    pxgamer
// @version      0.1
// @description  Puts sidebar elements next to each other in a 2 column layout.
// @author       pxgamer
// @include      *kat.cr/*
// @grant        none
// ==/UserScript==
/*jshint multistr: true */

(function() {
    'use strict';

    var params = {
        watchedThreads: '',
        latestForum: '',
        latestNews: '',
        blogroll: '',
        goodies: '',
        friendsLinks: ''
    };

    function init() {
        $('#sidebar').html('<div class="sbLeftCol inlineSbBlock"></div>');
        $('#sidebar').append('<div class="sbRightCol inlineSbBlock"></div>');
        $('.sbLeftCol').append(params.watchedThreads);
        $('.sbLeftCol').append(params.blogroll);
        $('.sbLeftCol').append(params.goodies);
        $('.sbLeftCol').append(params.friendsLinks);
        $('.sbRightCol').append(params.latestForum);
        $('.sbRightCol').append(params.latestNews);
        $('#sidebar').css('display', 'inline-flex');
        $('.inlineSbBlock').css('margin-right', '10px');
    }

    $('.sliderbox').each(function() {
        if ($(this).find('#watchedThreads').length > 0) {
            params.watchedThreads = $(this);
        }
        if ($(this).find('#latestForum').length > 0) {
            params.latestForum = $(this);
        }
        if ($(this).find('#latestNews').length > 0) {
            params.latestNews = $(this);
        }
        if ($(this).find('#blogroll').length > 0) {
            params.blogroll = $(this);
        }
        if ($(this).find('#goodies').length > 0) {
            params.goodies = $(this);
        }
        if ($(this).find('#friendsLinks').length > 0) {
            params.friendsLinks = $(this);
        }
    });

    init();

})();