user-script/github-tab-size.user.js
2022-04-22 21:29:01 +09:00

14 lines
292 B
JavaScript

// ==UserScript==
// @match https://github.com/*
// ==/UserScript==
"use strict";
const { body } = window.document;
function main() {
const el = body.querySelector(".tab-size");
if (el) el.dataset.tabSize = "2";
}
new MutationObserver(main).observe(body, { childList: true });
main();