Created
October 21, 2022 22:27
-
-
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
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 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; }'); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Awesome extension!