Pixiv UI Compactor

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

目前為 2022-01-06 提交的版本,檢視 最新版本

// ==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); }
}