Last active
May 19, 2026 22:21
-
-
Save plu5/dbbe0c3ba407c1e8ed432342edcd70e8 to your computer and use it in GitHub Desktop.
GitHub Actions inputs to textareas userscript. Enables multiline inputs to workflows. Install link (requires Grease/Tamper/Violentmonkey browser extension): https://gist.githubusercontent.com/plu5/dbbe0c3ba407c1e8ed432342edcd70e8/raw/ghtextareas.user.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name ghactions inputs to textareas | |
| // @namespace Violentmonkey Scripts | |
| // @version 1.0.0 | |
| // @match https://github.com/*/actions/workflows/* | |
| // @grant unsafeWindow | |
| // @author plu5 | |
| // @description Converts inputs to textareas to enable multiline | |
| // @homepageURL https://gist.github.com/plu5/dbbe0c3ba407c1e8ed432342edcd70e8 | |
| // @updateURL https://gist.githubusercontent.com/plu5/dbbe0c3ba407c1e8ed432342edcd70e8/raw/ghtextareas.user.js | |
| // @downloadURL https://gist.githubusercontent.com/plu5/dbbe0c3ba407c1e8ed432342edcd70e8/raw/ghtextareas.user.js | |
| // ==/UserScript== | |
| (function() { | |
| const mutationHappened = () => { | |
| document.querySelectorAll('input').forEach(input => { | |
| if (/^input_\d+$/.test(input.id)) { | |
| const textarea = document.createElement('textarea'); | |
| for (const attr of input.attributes) { | |
| textarea.setAttribute(attr.name, attr.value); | |
| } | |
| textarea.value = input.value; | |
| input.replaceWith(textarea); | |
| } | |
| }); | |
| }; | |
| const observer = new MutationObserver(mutationHappened); | |
| observer.observe(document.documentElement, { | |
| childList: true, | |
| subtree: true | |
| }); | |
| mutationHappened(); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment