Mark Backlog Document Headings

Adds heading-level markers before each heading in Backlog documents to improve their visibility.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

Advertisement:

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

Advertisement:

// ==UserScript==
// @name            Mark Backlog Document Headings
// @name:ja         Backlog ドキュメントの見出しにマーカーをつける
// @namespace       https://github.com/simochee/userscripts
// @version         2026.07.02.1
// @description     Adds heading-level markers before each heading in Backlog documents to improve their visibility.
// @description:ja  Backlog のドキュメントの各見出しの前に見出しレベルのマーカーをつけて視認性を上げます。
// @license         MIT
// @icon            https://www.google.com/s2/favicons?sz=64&domain=backlog.jp
// @match           https://*.backlog.com/*
// @match           https://*.backlog.jp/*
// @match           https://*.backlogtool.com/*
// @grant           GM_addStyle
// ==/UserScript==

(function() {
	"use strict";
	var s = new Set();
	var _css = async (t) => {
		if (s.has(t)) return;
		s.add(t);
		((c) => {
			if (typeof GM_addStyle === "function") GM_addStyle(c);
			else (document.head || document.documentElement).appendChild(document.createElement("style")).append(c);
		})(t);
	};
	_css("@import \"https://fonts.googleapis.com/css2?family=Pathway+Gothic+One&text=%23&display=swap\";\n\n.doc-container :where(h1, h2, h3, h4, h5, h6) {\n  position: relative;\n}\n\n.doc-container :where(h1, h2, h3, h4, h5, h6):before {\n  color: var(--textColorWeak);\n  font-family: Pathway Gothic One, sans-serif;\n  position: absolute;\n  top: 50%;\n  left: 0;\n  transform: translateX(calc(-100% - 8px)) translateY(-50%);\n}\n\n.main-container:where(.-medium, .-small) :where(h1, h2, h3, h4, h5, h6):before {\n  left: 5px;\n}\n");
	var markers = Array.from({ length: 6 }, (_, i) => i + 1).map((lv) => `
	.doc-container h${lv}::before {
		content: "${"#".repeat(lv)}";
	}
`).join("\n");
	GM_addStyle(markers);
})();