NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name Sel.be QOL_2
// @namespace http://tampermonkey.net/
// @version 0.1.1
// @description aw shit here we go again
// @author Kuroi_Mato_O
// @supportURL http://t.me/kuroi_mato_O
// @updateURL https://openuserjs.org/meta/Kuroi_mato_O/Sel.be_QOL_2.meta.js
// @downloadURL https://openuserjs.org/install/Kuroi_mato_O/Sel.be_QOL_2.user.js
// @copyright 2022, Kuroi_mato_O (https://openuserjs.org/users/Kuroi_mato_O)
// @license MIT
// @match https://zakupay.sel-be.ru/core/spa2
// @match https://zakupay.sel-be.ru/core/offers/operator/workplace
// @require https://code.jquery.com/jquery-3.4.1.min.js
// @require https://code.jquery.com/ui/1.12.1/jquery-ui.min.js
// @require https://raw.githubusercontent.com/uzairfarooq/arrive/master/minified/arrive.min.js
// @icon https://www.google.com/s2/favicons?domain=sel-be.ru
// @grant none
// ==/UserScript==
(function() {
'use strict';
//CTRL+F SEARCH (W/O ENTER)
// const debounce = (fn, ms = 0) => {
// let timeoutId;
// return function(...args) {
// clearTimeout(timeoutId);
// timeoutId = setTimeout(() => fn.apply(this, args), ms);
// };
// };
// document.querySelector('#search-input').addEventListener("keydown", debounce(() => {
// document.querySelector('span[func="search"]').click();
// document.querySelector('#search-input').focus();
// window.GcSpread.Sheets.FocusHelper.setActiveElement(null);
// }, 600));
window.addEventListener("keydown", function(e) {
if (e.keyCode === 114 || (e.ctrlKey && e.keyCode === 70)) {
e.preventDefault();
// window.GcSpread.Sheets.FocusHelper.setActiveElement(null);
document.querySelector('.search-positions').focus();
document.querySelector('.search-positions').select();
}
if (e.keyCode === 27) {
e.preventDefault();
document.querySelector('.search-positions').blur();
}
})
})();