Last active
April 28, 2022 04:09
-
-
Save jordanwalsh23/c3327c61557a31e850a24a875a1937dc to your computer and use it in GitHub Desktop.
Tampermonkey Script to fix documentation display issues in postman
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 Postman Workspace Description Margin Fix | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1 | |
| // @description Fix margin issue on documentation pages. | |
| // @author Jordan Walsh | |
| // @match https://*.postman.co/* | |
| // @match https://*.postman.com/* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=postman.co | |
| // @grant none | |
| // ==/UserScript== | |
| (function() { | |
| 'use strict'; | |
| addGlobalStyle('.ws-meta-description-md ol, .ws-meta-description-md ul { margin: var(--spacing-zero) var(--spacing-xl) !important; padding: var(--spacing-zero) !important; }'); | |
| addGlobalStyle('.ws-meta-description-md p { padding: 5px 0; }'); | |
| addGlobalStyle('.ws-meta-description-md h1,.ws-meta-description-md h2, .ws-meta-description-md h3,.ws-meta-description-md h4,.ws-meta-description-md h5 { margin: 10px 0 5px 0 !important; }'); | |
| })(); | |
| function addGlobalStyle(css) { | |
| var head, style; | |
| head = document.getElementsByTagName('head')[0]; | |
| if (!head) { return; } | |
| style = document.createElement('style'); | |
| style.type = 'text/css'; | |
| style.innerHTML = css; | |
| head.appendChild(style); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment