Skip to content

Instantly share code, notes, and snippets.

@farmerbb
Created October 21, 2022 22:27
Show Gist options
  • Save farmerbb/a260728b8a476ab222f518da6644c4e1 to your computer and use it in GitHub Desktop.
Save farmerbb/a260728b8a476ab222f518da6644c4e1 to your computer and use it in GitHub Desktop.
Userscript to increase the height of the JSON editor box for Optimizely feature variables
// ==UserScript==
// @name Optimizely - Increase Height of JSON Editor
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Increases the height of the JSON editor box for Optimizely feature variables
// @author Braden Farmer
// @match https://app.optimizely.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Based on https://somethingididnotknow.wordpress.com/2013/07/01/change-page-styles-with-greasemonkeytampermonkey/
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);
}
addGlobalStyle('div:has(> .react-codemirror2) { height: 300px !important; }');
})();
@loganblevins
Copy link

Awesome extension!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment