Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit9f9ba253bf00b7dec2046e96fc8ea901d7e479fe (patch)
Author
 Kamen Mladenov <kamen@syndamia.com>
2023-03-13 18:31:17 +0000
Committer
 Kamen Mladenov <kamen@syndamia.com>
2023-03-13 18:31:17 +0000
Files5951ba1deb7eb11ca78128c27951f7b976b6c896
userscripts-9f9ba253bf00b7dec2046e96fc8ea901d7e479fe.tar
userscripts-9f9ba253bf00b7dec2046e96fc8ea901d7e479fe.tar.gz
userscripts-9f9ba253bf00b7dec2046e96fc8ea901d7e479fe.zip
Parentf2f440690b9ce0000d09e7751fa7a4de9ff43984 (diff)
Added vim-fmi point counter
1 files changed, 25 insertions, 0 deletions
-rw-r--r--vim-fmi-keystrokes.js25
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);
+});