Summary Files Commits Branches @commit @diff @stats
path: root / vim-fmi-keystrokes.js
blob: c8fc6bda3181003c3297dedc170543c94940738c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// ==UserScript==
// @name        vim-fmi точки
// @description Добавя брой натиснати клавиши във всяка страница на решения
//
// @version     1.0
// @license     MIT
// @author      Syndamia
//
// @source      https://gitlab.com/Syndamia/userscripts/-/blob/main/vim-fmi-keystrokes.js
// @supportURL  https://gitlab.com/Syndamia/userscripts/-/issues
// @homepage    https://gitlab.com/Syndamia/userscripts/
// @icon        https://vim-fmi.bg/favicon.png
//
// @namespace   Syndamia
// @match *://*vim-fmi.bg/tasks/*
// @run-at document-body
// ==/UserScript==

document.getElementsByTagName('ul')[3].childNodes.forEach((x) => {
	if (x.tagName != 'LI') return;
	var countElem = document.createElement('span');
    countElem.style.verticalAlign = 'bottom';
	countElem.innerText = x.children[0].children.length;
	x.insertBefore(countElem, x.firstChild);
});