gitlab add 'v' shortcut to mark file as read

4/27/2023, 5:06:16 PM

// ==UserScript==
// @name        gitlab add 'v' shortcut to mark file as read
// @namespace   Violentmonkey Scripts
// @match       https://git.unity.pl/*
// @grant       none
// @version     1.0
// @author      gsobczyk
// @description 4/27/2023, 5:06:16 PM
// @license MIT
// ==/UserScript==
document.onkeyup = async function (e) {
    if (e.key === 'v' && !e.target.matches('input, textarea')) {
        e.preventDefault();
        await $('[data-testid="fileReviewCheckbox"]')[0].click();
    }
}