instaclear

ice cold killa

Stan na 30-07-2020. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         instaclear
// @namespace    sanyabeat.instaclear
// @version      1.0
// @description  ice cold killa
// @author       sanyabeast <[email protected]>
// @match        https://www.instagram.com/
// @match        https://www.instagram.com/*
// @match        https://www.instagram.com/*/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    console.log("%cinstacler works", "color: green")

    function clear_instagram () {
        let cleared_count = 0
        let o = document.querySelectorAll("div + div");
        for (let i=0;i<o.length;i++){
            let e = o[i]
            if (e.children.length === 0 && e.style.zIndex !== "-1") {
                cleared_count++
                e.style.zIndex = "-1"
            }
        }

        if (cleared_count > 0){
             console.log(`%cjust cleared ${cleared_count} emptyboxes`, "color: orange")
        }
    }

    let target = document.body

    const config = {
        attributes: true,
        childList: true,
        subtree: true
    };

    const callback = function(mutationsList, observer) {
        setTimeout(clear_instagram, 250);
    };

    const observer = new MutationObserver(callback);
    observer.observe(target, config);
    // Your code here...
})();