user-script/github-tab-size.user.js

15 lines
292 B
JavaScript
Raw Normal View History

2022-04-22 21:26:36 +09:00
// ==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();