// ==UserScript== // @name Expand project columns // @namespace basicinc.github.projects.expand // @description Expand project columns // @include https://github.com/*/*/projects/* // @version 1.0 // @grant none // ==/UserScript== document.querySelectorAll(".js-details-container").forEach(function(node){ var div = document.createElement('div'); var expand_button='' div.innerHTML = expand_button; var expand_button = div.childNodes[0]; expand_button.addEventListener("click", function(){ this.parentElement.parentElement.setAttribute("style","min-width:1000px;max-width:1000px"); this.setAttribute("style","display:none"); this.nextSibling.setAttribute("style",""); }) node.insertBefore(expand_button, node.childNodes.first) var collapse_button='' div.innerHTML = collapse_button; var collapse_button = div.childNodes[0]; collapse_button.addEventListener("click", function(){ this.parentElement.parentElement.setAttribute("style",""); this.setAttribute("style","display:none"); this.previousSibling.setAttribute("style",""); }) node.insertBefore(collapse_button, node.childNodes.first) })