Greasy Fork is available in English.
auto foucs on first input box
当前为
// ==UserScript==
// @name auto focus on first <input>
// @name:zh 自动聚焦第一个输入框
// @namespace http://tampermonkey.net/
// @version 0.2.0
// @description auto foucs on first input box
// @description:zh 默认聚焦到第一个搜索框中
// @author Vinsea
// @match *
// @match http*://*/*
// @license MIT
// ==/UserScript==
(function() {
'use strict';
const firstInput = document.querySelector('input:not([type=hidden])');
if(firstInput){
const val = firstInput.value;
firstInput.value = '';
firstInput.focus();
firstInput.value = val;
}
})();