From 9f9ba253bf00b7dec2046e96fc8ea901d7e479fe Mon Sep 17 00:00:00 2001 From: Kamen Mladenov Date: Mon, 13 Mar 2023 18:31:17 +0000 Subject: Added vim-fmi point counter --- vim-fmi-keystrokes.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 vim-fmi-keystrokes.js diff --git a/vim-fmi-keystrokes.js b/vim-fmi-keystrokes.js new file mode 100644 index 0000000..c8fc6bd --- /dev/null +++ b/vim-fmi-keystrokes.js @@ -0,0 +1,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); +}); -- cgit v1.3.1-23-gd82d