Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save brandonhellman/4af5b911861b0942e2410f63f2875360 to your computer and use it in GitHub Desktop.
Save brandonhellman/4af5b911861b0942e2410f63f2875360 to your computer and use it in GitHub Desktop.
Larger Radio Buttons and Checkboxes
// ==UserScript==
// @name Larger Radio Buttons and Checkboxes
// @version 1.0.0
// @include *
// ==/UserScript==
/* Function that injects CSS rules */
function injectStyles(rule) {
const style = document.createElement('style');
style.type = 'text/css';
style.textContent = rule;
document.body.appendChild(style);
}
/*Individual calls to add styles */
injectStyles('input[type=radio] { width: 2.0em; height: 2.0em;}');
injectStyles('input[type=checkbox] { width: 1.5em; height: 1.5em;}');
document.body.insertAdjacentHTML('afterbegin', '<style>input[type=radio] { width: 1.5em; height: 1.5em; }</style>');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment