Skip to content

Instantly share code, notes, and snippets.

@jamesmacfie
Last active April 30, 2020 04:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesmacfie/baaee556456c39d10a22de601de50096 to your computer and use it in GitHub Desktop.
Save jamesmacfie/baaee556456c39d10a22de601de50096 to your computer and use it in GitHub Desktop.
πŸ™Œ Drone

Drone prettier

What this does

  • makes the console full width by default
  • makes the left column wider
  • auto clicks the "view more" button
  • adds in CSS classes for colour
  • adds the correct CSS to display build logs in a more sane way

How to install

GreaseMonkey for Firefox: https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/ TamperMonkey for Chrome: https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo//Open

Create a new script and paste in the contents from drone.js below. For both TamperMonkey and GreaseMonkey you create these via the icon that appears in the browser toolbar

// ==UserScript==
// @name Drone
// @namespace https://drone.tools.solvestack.net/
// @description Change Drone
// @include https://drone.tools.solvestack.net/*
// ==/UserScript==
function addCss(cssString) {
const head = document.getElementsByTagName('head')[0];
const newCss = document.createElement('style');
newCss.type = "text/css";
newCss.innerHTML = cssString;
head.appendChild(newCss);
}
addCss (
`.container {max-width: 100%!important;}
.output-content { white-space: pre; }
.stages { flex: 0 0 400px!important; width: 400px!important; }
.ansi-black-fg { color: #002b36; }
.ansi-red-fg { color: #dc322f; }
.ansi-green-fg { color: #859900; }
.ansi-yellow-fg { color: #b58900; }
.ansi-blue-fg { color: #268bd2; }
.ansi-magenta-fg { color: #d33682; }
.ansi-cyan-fg { color: #2aa198; }
.ansi-white-fg { color: #fdf6e3; }
.ansi-bright-black-fg { color: #555555; }
.ansi-bright-red-fg { color: #d75f00; }
.ansi-bright-green-fg { color: #585858; }
.ansi-bright-yellow-fg { color: #626262; }
.ansi-bright-blue-fg { color: #808080; }
.ansi-bright-magenta-fg { color: #5f5faf; }
.ansi-bright-white-fg { color: #ffffd7; }`);
setInterval(() => {
const buttons = document.querySelectorAll('.output-content-actions .button')
if (buttons.length) {
buttons[0].click();
}
}, 500)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment