Skip to content

Instantly share code, notes, and snippets.

@DaCurse
Created September 15, 2021 11:08
Show Gist options
  • Save DaCurse/05b088927454dcbd1b956394c739aa9d to your computer and use it in GitHub Desktop.
Save DaCurse/05b088927454dcbd1b956394c739aa9d to your computer and use it in GitHub Desktop.
A UserScript to customize GitHub's tab size
// ==UserScript==
// @name Github Tab Size
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Changes GitHub's tab size
// @author DaCurse
// @match https://github.com/*
// @icon https://github.githubassets.com/favicons/favicon.svg
// @grant none
// ==/UserScript==
(function() {
'use strict';
const size = 2;
const style = document.createElement('style');
style.innerHTML = `
.tab-size {
-webkit-tab-size: ${size} !important;
-moz-tab-size: ${size} !important;
-o-tab-size: ${size} !important;
tab-size: ${size} !important;
}`;
document.head.appendChild(style);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment