您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
makes project columns collapsible
当前为
// ==UserScript== // @name GitHub Collapse Project Columns // @namespace https://github.com/mestiez // @version 1.0 // @description makes project columns collapsible // @author mestiez // @match https://github.com/*/*/projects/* // @grant none // ==/UserScript== var button = '<button type="button" class="float-right js-details-target btn-octicon p-1 tooltipped tooltipped-w hide-sm column-menu-item" aria-label="Collapse" aria-expanded="false"><svg class="octicon octicon-plus" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M6 2L0 8l6 6V2z"></path></svg></button>'; (function () { "use strict"; const column = document.getElementsByClassName("project-column"); for (let i = 0; i < column.length; i++) { const element = column[i].children[0].children[0]; column[i].addEventListener("click", ()=>{ column[i].style = ""; }); element.innerHTML += (button); element.lastElementChild.addEventListener("click", (e) => { event.stopImmediatePropagation(); column[i].style = "max-width: 40px !important;display: table !important;min-width: 0px !important;white-space: nowrap !important;";}); } })();