Pixiv UI Compactor

Hides popular works block from Pixiv search page, removes unnecessary spaces to make the header ~2 times smaller.

Tính đến 06-01-2022. Xem phiên bản mới nhất.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

Bạn sẽ cần cài đặt một tiện ích mở rộng như Tampermonkey hoặc Violentmonkey để cài đặt kịch bản này.

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.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

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        Pixiv UI Compactor
// @description Hides popular works block from Pixiv search page, removes unnecessary spaces to make the header ~2 times smaller.
// @namespace   puic
// @include     https://www.pixiv.net/*
// @version     1.04
// @license     MIT
// @grant       GM_addStyle
// @grant       GM_xmlhttpRequest
// @grant       GM_registerMenuCommand
// @grant       GM_setValue
// @grant       GM_getValue
// ==/UserScript==
function changeWidth(){
        var pixiv_header_margin = document.getElementsByClassName("expahI")[0];
        pixiv_header_margin.style.height = "20px";
        
        var pixiv_tags_belt = document.getElementsByClassName("dztvKv")[0];
        pixiv_tags_belt.style.padding = "0px 0px 0px 0px";
        
        var pixiv_search_options = document.getElementsByClassName("laRMNP")[0];
        pixiv_search_options.style.margin = "0px 0px 0px 0px";
        
        var pixiv_main_container = document.getElementsByClassName("buukZm")[0];
        pixiv_main_container.style.padding = "0px 0px 0px 0px";
        
        var pixiv_popular_works = document.getElementsByClassName("ePRNko")[0];
        if (pixiv_popular_works) { element.parentNode.removeChild(element); }
}