Confluence SideBar

Remove Confluence SideBar crap

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         Confluence SideBar
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Remove Confluence SideBar crap
// @author       You
// @license      GPL v3
// @match        https://*.atlassian.net/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=mozilla.org
// @require  http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @grant        none
// @run-at       document-idle
// ==/UserScript==

function sleep(ms)
{
    return new Promise(resolve => setTimeout(resolve, ms));
}

function shortcut_filter()
{
    return $(this).html() === "Shortcuts";
}

///////////////////////////////////////////////////
//////////////// END OF HEADER ////////////////////
///////////////////////////////////////////////////

var is_join = 0;
var is_min = 0;
var is_present = 0;

sleep(2000);

const autoAdmit = (mutation) =>
{
    if (!mutation.addedNodes)
    {
        return;
    }
    //var sh = $("div:contains('Shortcuts')");
    var sh = $("div").filter(shortcut_filter);
    var pr = sh.parent().parent().parent();
    var apps = $('div[data-testid="space-apps"]');
    var ss = $("span:contains('Space settings')");
    var ss_pr = ss.parent().parent();
    var at = $("span:contains('Automation')");
    var at_pr = at.parent().parent();
    var ac = $("span:contains('All content')");
    var ac_pr = ac.parent().parent();

    if( is_join==0 )
    {
        pr.remove();
        ss_pr.remove();
        at_pr.remove();
        ac_pr.remove();
        apps.remove();
        is_join = 1;
    }
};

const observer = new MutationObserver((mutations) => mutations.forEach(autoAdmit));

// Options for the observer (which mutations to observe)
const obs_config = { attributes: true, characterData: false, childList: true, subtree: true };

observer.observe(document.body, obs_config);